From mboxrd@z Thu Jan 1 00:00:00 1970 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 3A744CA0FED for ; Wed, 27 Aug 2025 17:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=GeN/6w32Ees1LzInKBM7izVtXv1QIcTzej5ZPOkCgzs=; b=RT9gFzIrxw/Ka1xhIjC4UhcdNa 5+rhIjKkOYajYOJHVx2yIBVunlT8Idet/vPH34xv9I1IfOvLiSDAgGS9suxa6kr0/Qzt9Gp0drzdL GKwDOLQYB0p27TC4vhQYohDODCwEx5I/lC7fxYmNXwlrABrfU7aqW6Hf6WDopefVex8gQT0BKF/bR 3OiMdCLII9t/t0iHyV01q1fHFpI4K0C03fqvXBIyOmuQb62ByATHMM4b6jvIJfETmKyXbYZUGiTyF SjfyEqOvp4R7SuF4d7ZgRLpRw8FfD52m+fIkRymD+SFxrbkPvs4KDVz3soXnpBevoFNKBmX092oRg F9L+HwAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1urJbt-0000000GFsm-1dn0; Wed, 27 Aug 2025 17:06:57 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1urHYT-0000000FpG6-30L5 for linux-arm-kernel@lists.infradead.org; Wed, 27 Aug 2025 14:55:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1756306517; x=1787842517; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VVTD+gRkSYL1zFC/AuUFrbB6yo9BKBx9w+JU2+HE7nE=; b=DvFsmV9kZZny69Gse36wPiNeUNTDJ0AW16eOx3DWE30rMYY2POGj7ahH KtSpB4nx2r0wPk9EHrBqnRxVHLNU6jKpFdriqJbL6iy+IZ92kX53C9+r3 dQag45AcXIYasTwBcKWWaw6OXRDWZ8ByRaA0mZmNFjI13h5wLCqOl7Xd8 bB8IeenRlWqnBZYOiKxXNOwI1Gh+iClwh70SCxVDuyr+CQQvxayMEcPH5 VFy2CwbU3SigzGElF4lrhzlXIjO8nr8xWcAPXrZ+8mME9/mc7hci4i6Co 1sdq4ddouPSmbtwIf2TZeQSOOZtxUrii8nK2+TjD5XiiExOJty805mkyK Q==; X-CSE-ConnectionGUID: 4yuHX6b1S/u7TSh6v5Gw7g== X-CSE-MsgGUID: BUnd2GltR5uNF4z6Farg4g== X-IronPort-AV: E=Sophos;i="6.18,214,1751266800"; d="scan'208";a="46291227" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Aug 2025 07:55:14 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 27 Aug 2025 07:54:44 -0700 Received: from ROU-LL-M43238.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Wed, 27 Aug 2025 07:54:42 -0700 From: To: ARM Maintainers , Alexandre Belloni , Ryan Wanner , Varshini Rajendran , Claudiu Beznea CC: , , Nicolas Ferre Subject: [PATCH 3/3] ARM: at91: pm: save and restore ACR during PLL disable/enable Date: Wed, 27 Aug 2025 16:54:27 +0200 Message-ID: <20250827145427.46819-4-nicolas.ferre@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250827145427.46819-1-nicolas.ferre@microchip.com> References: <20250827145427.46819-1-nicolas.ferre@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250827_075517_821694_2E1DE4A4 X-CRM114-Status: GOOD ( 10.93 ) 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 Ferre Add a new word in assembly to store ACR value during the calls to at91_plla_disable/at91_plla_enable macros and use it. Signed-off-by: Nicolas Ferre [cristian.birsan@microchip.com: remove ACR_DEFAULT_PLLA loading] Signed-off-by: Cristian Birsan --- arch/arm/mach-at91/pm_suspend.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index 7e6c94f8edee..aad53ec9e957 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -689,6 +689,10 @@ sr_dis_exit: bic tmp2, tmp2, #AT91_PMC_PLL_UPDT_ID str tmp2, [pmc, #AT91_PMC_PLL_UPDT] + /* save acr */ + ldr tmp2, [pmc, #AT91_PMC_PLL_ACR] + str tmp2, .saved_acr + /* save div. */ mov tmp1, #0 ldr tmp2, [pmc, #AT91_PMC_PLL_CTRL0] @@ -758,7 +762,7 @@ sr_dis_exit: str tmp1, [pmc, #AT91_PMC_PLL_UPDT] /* step 2. */ - ldr tmp1, =AT91_PMC_PLL_ACR_DEFAULT_PLLA + ldr tmp1, .saved_acr str tmp1, [pmc, #AT91_PMC_PLL_ACR] /* step 3. */ @@ -1207,6 +1211,8 @@ ENDPROC(at91_pm_suspend_in_sram) #endif .saved_mckr: .word 0 +.saved_acr: + .word 0 .saved_pllar: .word 0 .saved_sam9_lpr: -- 2.43.0