From patchwork Sat Jun 25 11:36:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12895341 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 D993CC43334 for ; Sat, 25 Jun 2022 11:41:32 +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=N7iajVsFsVB79a pOMhfkjeNw4j9iRCzuA5SN0HZG6wRQLxNg88jqnRsoiGakij/RLozEWuLVQ6Ix6kF4XKOroGIUUcc FV5qLaZsLNJRv9m9rec9bBjjgDrdHS+fR7u1mykO3PPOyiUOEfr8Nm/RJM48mDGMqS446lN8zR0Nm k7YrmcO8OgLFAloP7WMuG1/Qgibl5LX/wteweJz7IzHjBt38aVmKnjWsDxrTFW+UFJfKVNG0VcxRl 7v/YxMCAQ5Rjz2VzXo7tZ9ykb+Izsz9Fg908iT0+eCxDo+XFooBEbdt2KbfArn14BZZQOJYwmtKzh gWbW6jjOTfNvhMru4uow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o549L-005o3r-9b; Sat, 25 Jun 2022 11:40:27 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o546D-005mc3-Ji for linux-arm-kernel@lists.infradead.org; Sat, 25 Jun 2022 11:37:15 +0000 Received: from localhost.localdomain ([37.4.249.155]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MgNxZ-1nS9Fe3aPP-00hy2z; Sat, 25 Jun 2022 13:37:05 +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 V4 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Sat, 25 Jun 2022 13:36:19 +0200 Message-Id: <20220625113619.15944-12-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220625113619.15944-1-stefan.wahren@i2se.com> References: <20220625113619.15944-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:2PrwkBUhlX3feTxtsVZZDn4SLPgtv9Owu+n+ReAxpWPwW+CUQu/ CTWiEynQbYzHpcIvmpdxk4zbxImg9Xfro0H4ROK2q+C70L+C4IqHLfkJ1PUWyCHIaDheqcW OYSBuHy0/F4ungU8+2oIHg09DZ4gxRqMYdGZDuzXnIwAMVDQKD+zmpkj7n2U8teZGqk1J+t 3JV96p6oLrPy10pqF4q4A== X-UI-Out-Filterresults: notjunk:1;V03:K0:TsRRSqpYVLU=:frROenGdWb1y3SOA3jkZIM qQ9IleGV+nFEDrD+ysN+HWBXyUnlppwXIKyOHW/jL2fBRB+S/FcNk0DCRuT3GzDe0cU4z/L9N YHnq4tOO/bA1fL0quxPu716Tt/HPH1dWmV8NZiWZbuAA8jXCMEYdQVuwBkLRDycqbvYQSBeSY farJCjkJhCv4zfqdadiyMjKeiJhNpb5cyZODifh1hfSt5d458L8aNQu/UKwkLDNXWu2xJDPyb DnaYJ01yHvHGpQcctK9nv/mTatgqxFNuB5+MFadoUvgAZ2s2aPDG5AMWrVoEVOPMAEGxiMZXK tQdc1AmjwwOEjup63QLQEu/HB/oDBkabnZ8GotOdddIPTLEH7QgOycOaWxw54NhWEFgl17aFq GPpSG4PMhhaB67zxKOvNR1+0ADdiPCH9trwPXIJPlQAuKCUeNrekHwe4SYbzg/ZWRs7MxbxR7 f0Y1pe/Oari0m9NNwjnBxZoM4sS6l6+P3ooXtemoJNzyipzEnmMVdSZDO7enYWfiJh/09TiDv lCzFLHbGi+p1mGlzblqepsDi0VU4cscgAMPZCm0Yh/ce137cThJ4/LAeHHfkflq6vYeZc93Qp j47IdV4gyIElS9Sd9y26XaJHnANo/uu/QgXE/9weBI+NbiKXNypnLW1IvwIy3mSIx6f1fnJcy /49dGVAQoDqfJKV2tKc80KGeKL7xNI1Y4otedAvvbfw32icKYCIfMEN53LH0AlQA6O7OMu2Bx rz6pQdTOBZC1FFNIijTF24UE129FXiijW1fDMp+4rJYN/wEzH7eHZD5EIJU= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220625_043714_003631_47D9DEA2 X-CRM114-Status: GOOD ( 13.16 ) 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 Acked-by: Florian Fainelli --- 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;