From patchwork Tue Jun 7 20:42:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12872371 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 3E8EBC43334 for ; Tue, 7 Jun 2022 20:46:10 +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=LIdrq+phJpYoAi xmO/8Blu4Igl6b5aEv1i28y+bmHxgPW8lbgHoHaHmsxUWTDf1Q6MOOkakmVe5UptmqU+FDaXo/pig YwT/wesKVYUuQWxZPqsKvPcAX9iagpSLqBrX+X6gfLqp7r9IxmI6g6AfYYHYYHEGR9PvN/Z6GcUJ8 lBIqgzsD9zAMvmC77gBRIIVnOB6ugQCvzxtjct5op7Kr2YcDadMqq0IoHcq7l337JCRk85gpjglVZ Fm1SS/VUvrbXHXmeVtkRowujmcXfEYf6V/1pl6xsozUnlo3pxE3tXhBCJm58PHTBeJmpNcb58zeD1 2560y600IrH1b4F/mJaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyg4X-009akg-Ag; Tue, 07 Jun 2022 20:45:06 +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 1nyg2a-009Zcp-Ep for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 20:43:07 +0000 Received: from localhost.localdomain ([37.4.249.155]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MG9wg-1nzimL0mIW-00GVPU; Tue, 07 Jun 2022 22:42:57 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH V3 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Tue, 7 Jun 2022 22:42:26 +0200 Message-Id: <20220607204226.8703-12-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220607204226.8703-1-stefan.wahren@i2se.com> References: <20220607204226.8703-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:Wtkv+hQrAAMAAjclZalXUshwgD8klBrtNAKDIEssOEpe7Z/SDqq 99TZ71KP6KKymnZOpRenvM8uqfxL0STiZ9Jbhox1of2t+kiG8mDYh6/yMieUzMb3g5GNwMe xBx9nt4vjWuOM5preX2/9BriLsl4R0qhq+rwnqO3BI1eqKb5mIS45j1flL4dRTK4W/bzRj5 Y95BL6BxSwArG+qYiy0Ng== X-UI-Out-Filterresults: notjunk:1;V03:K0:eek+58zNOOs=:ekds34yXcLWY2ZWwiIpxNi uYRPIb99Wfa3fSUtOKbSus6urPys4OvgWtJ09/vM4/bHa9btMdtRGSykwkyd/Ee7d+ii5YpXY B+NPldToOUReIjP2gC2hpdkuUc6Q28ZIam3H2BoFr/NrZN9FvrARhW5S/6MPYhDqEoNy5hmeO xq4NpryUrTwzNd+mRngVS3X1klb80ypiTgLezrfIQqEu85sH/dEQs4DXdYk1y64gxd5kYyA9H qoB1zETJ7nVk5F+uAsHYRIcWkUxCoYR7+bv7EAqdfycv6KXsymH1qHHzMTd0TjRYJmXiTL4rh bQR1I+9U4VsdnqroPh1xh+qxncwlksm/hW5F1ABmykHRREgWV3v9Fg4KUq2zOeZgfAre6CNJ+ qVLO5e1tKWw8l82zCgwmjU1492auAhtfhq5GEPUJCcGj8kXRx5otr6JaGTU7f+iTSPpDLt6aV LUUiLAylxCD7NqP4Z6aT+Axujyu1+D5sr3DPKCmib9XYY9olbEZLe5KTrBdUsnnaFY73M7d0p wZ2DX6EarjHVMxr7sdksNVDzJ8UvPrXOiHdHnNE673VP7T26mjsBvMKz5CFzGCms36C/oOxID HS0453CF/Tm6Op66LVpx/BpUk9oTPFHjieomNCtSotgRd9uP97h0KVbxZNmSDFQ5Xon1RRdvn ufXis0kYUjqbOXDIoE5pKrfth7nu28OFwpuod58F+EPFZRBHP+/P8lmFb3cbb0Zya0wm7ofMX hOMGShcrMtDh4rY5hzJnNrxxr1YgfJ46FiBbXD2LQZcN4xEzznrEWykEzAI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_134304_889964_56A068F2 X-CRM114-Status: GOOD ( 13.44 ) 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;