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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D23FEB64D9 for ; Thu, 6 Jul 2023 21:32:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 481C7863A0; Thu, 6 Jul 2023 23:32:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1688679160; bh=YGkXl87nNW0Lcj552r9Q/wa98dIw88KcrkXLJU1bbaM=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Cehne4bvMo6RMQEJKaglIp70/9P2cIOHPXZA2OgiT646OpumKqaT5nT3nzRTu/LjC o0vpcsqPTI8UVO65pK2y47klOkSs1yJaAsgeJ9V4uM1G5dQeey0yYEBmgvJIurW+DD TYyvDuzfwZzmDRHxb8t2uaWPHCILHS+x/AntaQEc6yRuUqz45WhCiZ0fUjboRZVfFX HC5UrgjqlKVNkkjFYUYXKQQPUBFwUkpVl4uh1A3RMmRXeIetk1CUYy7MzD5aN46t+6 Pzs1qb2wVJSEE+s98fzG5m7MjgNs/yxTI9FpuMz2SQff5hrZqhxUtTkCvYY6RSH10e cCo21z2qWUa1w== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5B0B8862AE; Thu, 6 Jul 2023 23:32:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1688679158; bh=YGkXl87nNW0Lcj552r9Q/wa98dIw88KcrkXLJU1bbaM=; h=From:To:Cc:Subject:Date:From; b=k5kQE2Vihd7mymLu3qjd3eRysUVogF21E1lsDsI6irhBAAer3BZeD/FKdiDFIyDsu Wny40amHmpFX1DiG8tc6MNnjXWK0EQ9ESEPSvdMOS0zcIOyUWVMo7cg88IxLuiA/gq ceZOYEjWnNvP0v2wCqSAYcXg6FMAa2poY0yP+Ny3WUnSprkTj43ykOI/VIiyWNUVnT WxESZ2VICOuFXSXWENqhGzA0pUlCG20J1XQuPpY8mI956AZ0Ig1kI8R9ZVNpKybA3L iLxcbSI43Nth0BWH2Xx9YEMTwSMJgG1vgGdpl1qR4fk9Tyfn4J5Zowwdyu/gDawifU OPl32216jNiyQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Patrice Chotard , Patrick Delaunay , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH] ARM: stm32: Inhibit PDDS because CSTBYDIS is set Date: Thu, 6 Jul 2023 23:32:27 +0200 Message-Id: <20230706213227.113369-1-marex@denx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The PWR_MPUCR CSTBYDIS bit is set, therefore the CA cores can never enter CStandby state and would always end up in CStop state. Clear the PDDS bit, which indicates the CA cores can enter CStandby state as it makes little sense to keep it set with CSTBYDIS also set. This does however fix a problem too. When both PWR_MPUCR and PWR_MCUCR PDDS bits are set, then the chip enters CStandby state even though the PWR_MCUCR CSTBYDIS is set. Clearing the PWR_MPUCR PDDS prevents that from happening. Signed-off-by: Marek Vasut --- Cc: Patrice Chotard Cc: Patrick Delaunay Cc: uboot-stm32@st-md-mailman.stormreply.com --- arch/arm/mach-stm32mp/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c index 50e3fc4ae45..79734b5289b 100644 --- a/arch/arm/mach-stm32mp/psci.c +++ b/arch/arm/mach-stm32mp/psci.c @@ -754,7 +754,7 @@ void __secure psci_system_suspend(u32 __always_unused function_id, setbits_le32(STM32_RCC_BASE + RCC_MP_CIER, RCC_MP_CIFR_WKUPF); setbits_le32(STM32_PWR_BASE + PWR_MPUCR, - PWR_MPUCR_CSSF | PWR_MPUCR_CSTDBYDIS | PWR_MPUCR_PDDS); + PWR_MPUCR_CSSF | PWR_MPUCR_CSTDBYDIS); saved_mcudivr = readl(STM32_RCC_BASE + RCC_MCUDIVR); saved_pll3cr = readl(STM32_RCC_BASE + RCC_PLL3CR); -- 2.40.1