From patchwork Sun May 15 20:20:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850085 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 775F4C433EF for ; Sun, 15 May 2022 20:24:57 +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=lJdVxq7w4F+YGAYy8B4yLLYc3wIyzcLH260pvbhZe5w=; b=ZFyDnXEpPgRKGQ pCR4gh6uZmOXxmIJ1hmPD8MN18b9KLcLqtpX07MODydsoXWzxRyvT9M6r0QVii9NijC3AjFHzdpuV Ko30hFdORrf5CPqmU5xIEG3B82qJa5R2SBzRLgkK08BiAkrDNQrTUV5u/T9FbGk0keEVrgBByIG89 UTtLUUCOzE4b11YppA8Cilyw5hEZWYABb9uflH53lIcCzTXFm9BKo9phMZN266haSwv/OFbw29iRU Fb9BZqLXKHYdcDBXZbjNYRVQRn8hRHl1jH3GtbTZv5fMjtnQaj/ogp2ynq33AJywbo7wLXcemUliz d+fV7BRqieLO1tWk1ymg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKmX-004vPg-H6; Sun, 15 May 2022 20:24:01 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk7-004uBX-By; Sun, 15 May 2022 20:21:33 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MrQ2R-1nVpyd3W9X-00oZSW; Sun, 15 May 2022 22:21:24 +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 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Sun, 15 May 2022 22:20:32 +0200 Message-Id: <20220515202032.3046-12-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:AM0pUZJy0xWo5m49ybRT1aE4KogOzmCzVRRc51lDsfppyqziW8p qXa0MWDk24XlbJUaOYgvsg1fuy7rmQiimR+fGYefcUSnAtxEFNedH78UiTX6vyUaFepfa9h RwQbpbNkSId3Jl6cHKMN2ks3vQ1o32KFsbZCY9gWJWqdDNyWpa+gcFU7qH0UkwM56WcwHmn wc4iKSLJ3aK5YEbxhpL7A== X-UI-Out-Filterresults: notjunk:1;V03:K0:HE/ehCz5E9E=:SKkkkeDKunTh+09gigVGOR P0HH3FaHI8oiylGV844J4/J9JSWalv2BCHNnBfQP2TvXPUOGfsCuOv5u7mAyj+7OneCoz8PU6 DZueQwndkOnHMJCjzav0C4rxox+EbvHh1dfYLRvLejGvLiHIDMqbZkvfyuZ1H6rOB60090oIH RA0ZCV3YSLriKC/10b/JoYOnF7xUg9G+RDQwcCGtuCR0TXvDJlJE+EM3Q/dSrnwVGJbA0b9vy aE9uPSQGG7btK0QSA6xuKjcP6WZl1U7KJK40ZXcGgRxgDD5AzoUkzR++UdcRfS+1AnbBP2b9c OC6KvI9i79qyEcl8AXYWlzHXQXnEYfajw4Mq3kfc+97u0L0N+9UHNDBbIzsJIs8nKRZA+jBMf dqtg33rKP3qL8z2qRJtuAzf2v29xvAgWVHZ9E8gk0xcbLIRuazpfZxh3/ikfs28YsatmQT0z/ P47HZ+KkNPk082Hg25Y3/t/GS85aQ9hZOud23dGdvx6nmGGEKUHWMYmovlGUrlxkyeAIfmhbK 9AFjgeel2Ee4XpImGI8Qfl7OiUzE1/7EsYdmiVh1Q4jitgaYFxd60bSY3ElTpMyPdTbLdwjmo 1wReojduhV3fkJ95qSgIYfLzAUUeQE0sPOboK+vtvaFN+l4hPIxcshBRXKwsT8IgjmyvvNqUY lWNBGZ6SLxII58e2VWZZ2Qb4Ou7iBHX1pu28+s1bmkDBESOKv5BpepQ6ExY8ToGIeu4D38HMO 23Pl9EE/NZ/qLw9d X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132131_822276_068B8F46 X-CRM114-Status: GOOD ( 11.53 ) 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;