From patchwork Sun Sep 6 21:43:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1358494 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=npWJCFWq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bl4qp4mWmz9sSn for ; Mon, 7 Sep 2020 07:51:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DEF6824A4; Sun, 6 Sep 2020 23:45:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="npWJCFWq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FD218244A; Sun, 6 Sep 2020 23:44:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B7DCC82378 for ; Sun, 6 Sep 2020 23:44:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id j2so12174355ioj.7 for ; Sun, 06 Sep 2020 14:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tjpgOMg7vyN9zU5Im0NQDwEHnPrHCzoACvKgn+igO3U=; b=npWJCFWqQWmXS5ZjSWB8seXta21zhjWvP2RiLCOFKL/8yoxCOfVIjS1Ev/p2XZrNCo /YheRrze/eVhTHSx3zBlO0ENhTJ8glw0BhDNcypu6OHJQCN2Xoabig/wJk45djWAptbV 6U5plbOaqWPI58F7eWPB7xnAmt9wD/1OR4qYU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tjpgOMg7vyN9zU5Im0NQDwEHnPrHCzoACvKgn+igO3U=; b=IRkSuSMBUhpuE3wO34I1Xb25iALNS97VHXWUYNiaVk1MzPVGaQp3E6e/5B/wF50EdM xGpAD5e/Q5ESnqAHZZk/C6XG83E/Sgjghh/wwq8cp7zlMH7yXiXhTgsTsNybEShYVI0N mlmdFFYfWAlXOcmhdEGWZ/ptbU5Ui+Eeyc3Nnu8WYL9/M9LAFxj4wWzn3vnYWrB4Y6jF u3dVyDz8h3GDvWj1Za6N3yA1bXH4d44+Grk0E1S7FA0b/3QROlCV20v/taJ5ewq2v2Bw w7k544jayeWmkIICfLUT6x4rGVXYUYUNfTHBYrdRaM0q/LLuSjqEVev6A6z4zzWjX6KQ A4IQ== X-Gm-Message-State: AOAM531prhN9SppINHwW6Q1Q4Kzc6r981pnCylEzJ6nJi/9T999DlxH4 xxyk9nzRludg/2ktIPNe4eKNGs7QHY9tpqmI X-Google-Smtp-Source: ABdhPJz3E9eVBk0n5U7V6AG2EcNjNdV/LmjWb9AVkbdRxNh+zCfZF3E0eG3zIbk1qYwEVwHNZAzUVw== X-Received: by 2002:a05:6638:69d:: with SMTP id i29mr17095242jab.138.1599428690598; Sun, 06 Sep 2020 14:44:50 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id w13sm6232663iox.10.2020.09.06.14.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 14:44:50 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Wolfgang Wallner , Bin Meng , Bernhard Messerklinger , Andy Shevchenko , Simon Glass Subject: [PATCH v3 38/57] x86: apl: Drop unnecessary code in PMC driver Date: Sun, 6 Sep 2020 15:43:46 -0600 Message-Id: <20200906154340.v3.38.Iebe5efc358267d65f014f9fe65f2907afe5e7052@changeid> X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog In-Reply-To: <20200906214405.71632-1-sjg@chromium.org> References: <20200906214405.71632-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean We don't have CONFIG_PCI in TPL but it is present in SPL, etc. So this code is not needed. Drop it, and fix a code-style nit just above. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/pmc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c index 192dec7109a..576d0187570 100644 --- a/arch/x86/cpu/apollolake/pmc.c +++ b/arch/x86/cpu/apollolake/pmc.c @@ -118,7 +118,8 @@ int apl_pmc_ofdata_to_uc_platdata(struct udevice *dev) int size; int ret; - ret = dev_read_u32_array(dev, "early-regs", base, ARRAY_SIZE(base)); + ret = dev_read_u32_array(dev, "early-regs", base, + ARRAY_SIZE(base)); if (ret) return log_msg_ret("Missing/short early-regs", ret); if (spl_phase() == PHASE_TPL) { @@ -133,11 +134,6 @@ int apl_pmc_ofdata_to_uc_platdata(struct udevice *dev) } upriv->acpi_base = base[4]; - /* Since PCI is not enabled, we must get the BDF manually */ - plat->bdf = pci_get_devfn(dev); - if (plat->bdf < 0) - return log_msg_ret("Cannot get PMC PCI address", plat->bdf); - /* Get the dwX values for pmc gpe settings */ size = dev_read_size(dev, "gpe0-dw"); if (size < 0)