From patchwork Wed Jun 1 12:53:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12866886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0811AC433F5 for ; Wed, 1 Jun 2022 12:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5uXOrDrYst1b0LkcPeSh0AcqbbkJ9An567uquI6wa1E=; b=jH67tTrxyGKRxM 0bPx5AgBC7efH6Bivyj5MFrT+fXUhZ6n86VaAOaOy3EUIIxhHQZVdaU7KPTAXSXhZXN89I6ZoGjsS BQzkfag7joTQ6+x8379EEkSp5jYd74NKWG7vwWyuZKRxsjZXjqVJeCcHGW04vW66xCtzoRL1ORuB4 xXM9wqCvIIolldJC7Ezf02hX9qwDm//h4xcoS0IHIMFybXycP4hNs0w/5mDnP9Tu9ybM6ZLiwJdvY LPaTyiFieXoKkSe93oIj9MUmNQoMMh4UuXlJ1moDW4EgDoovumVCZLfJrOFkmr2Vrk6/9lfEFDwkt xEByxh3gI7ihtocKaknw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwNs3-00G7i3-SA; Wed, 01 Jun 2022 12:54:43 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwNrY-00G7Xd-N0; Wed, 01 Jun 2022 12:54:15 +0000 Received: from localhost.localdomain ([37.4.249.170]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MEFrX-1o3mF10aAf-00ACtN; Wed, 01 Jun 2022 14:54:06 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH V2 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Wed, 1 Jun 2022 14:53:44 +0200 Message-Id: <20220601125344.60602-12-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601125344.60602-1-stefan.wahren@i2se.com> References: <20220601125344.60602-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:VJ7rsWMl2Jg6ImIz2fwWQ2RcRoEdGoGRnSkGfgd+kiIdqPBZXBz FTTmYp/RctCMbyTHdTsch14j6WX8+ssEbwhKFNWPW9pbjSTdb3hdhoUjh0H5eq2mhqB6GRn uNPWCQnybPaPyD56voqxZuZoFxrC1GeZjXzdR3AVaR6fSCJLSFBJ7AJg1nJZnCOoEhiIYZF Lgsv+YobADqv5P4hLKOmQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:W1/nx7AxilQ=:YBbbgkjQ6JYV56Q16ggyBa Abg+TLjOsl6UEQ1hSO3rg6VdJz1WbLY+q1Lu60mFggSeT2kVB4oT+Hu769X42belhTaRScRJh 39cQM9s0/6xUCKxNXndT2QCCt+F4ANQc4vX/lDlIPHHG6voKRHts5vqO+XHiUWibB4AK8VJdk Ez/BctJGedw4EL70rQp48w0g75yw0i85khmKPojS5jWh9tmL9kvNltJ2KbdDtdAhCVzArj4on W9kxtY0ybZ2dNb4mbbX4dkS3nPF1L4kJj2ZCdwxW6gsyF0EFlXY3ORnxbBdaYyufRh3NUqKnf WR7KNfVn8fXEg0NjVd3HMEFB24RqxQWpMbLEqW60HBDGh7lDYUrpzVdog0SLSq3VE/K8MAe/8 wOei+S5GqiYIiC2j6hWTywVOGjAN9YONJP2/u5CRZ6s+p2eWWSoKoRBYtAY0eTxt1Iyx/RCi9 Un42NVZvpVoYVgw39RMhGHYkq2KbiwIja59pHuMDJ3VeK9iVvYq1TxMHTU1TkBKGOALN1cUoV e83m+32ld87P/NJfJLFJ7SpqDsTy0D4W56q6kahy4OYMMKNQ/GK2n7kZA5wGPG4cQwluDH3Jo vndfFFuNPXG3Y5OPy0uIDjGqbP3aZeJE546Ym7sUtL7vffvwAzWl86GnJPgTbK6zwj0+alfi/ PyHpJyUnjABFXjdP69VLZbqAMG3VRZ/GR1KjzpxDLmHNHcDUZpn6+5MkxMawZciSFs8A4HrhR xszGuWbPQgW7aD0TEkVDfK3w1RIpMFH6uyov4J1iIu4zu75VZ6Wpv+m3qQA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_055413_097254_C2D620B4 X-CRM114-Status: GOOD ( 13.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nicolas Saenz Julienne Bypass power_on/power_off() when running on BCM2711 as they are not needed. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/soc/bcm/bcm2835-power.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 1e06d91c0739..5bcd047768b6 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -198,6 +198,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg) { struct bcm2835_power *power = pd->power; + /* We don't run this on BCM2711 */ + if (power->rpivid_asb) + return 0; + /* Enable functional isolation */ PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC); @@ -219,6 +223,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg) int inrush; bool powok; + /* We don't run this on BCM2711 */ + if (power->rpivid_asb) + return 0; + /* If it was already powered on by the fw, leave it that way. */ if (PM_READ(pm_reg) & PM_POWUP) return 0;