Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: at91: pm: save and restore ACR during PLL disable/enable

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 <nicolas.ferre@microchip.com>
[cristian.birsan@microchip.com: remove ACR_DEFAULT_PLLA loading]
Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Link: https://lore.kernel.org/r/20250827145427.46819-4-nicolas.ferre@microchip.com
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>

authored by

Nicolas Ferre and committed by
Claudiu Beznea
3cae7d18 296302d3

+7 -1
+7 -1
arch/arm/mach-at91/pm_suspend.S
··· 689 689 bic tmp2, tmp2, #AT91_PMC_PLL_UPDT_ID 690 690 str tmp2, [pmc, #AT91_PMC_PLL_UPDT] 691 691 692 + /* save acr */ 693 + ldr tmp2, [pmc, #AT91_PMC_PLL_ACR] 694 + str tmp2, .saved_acr 695 + 692 696 /* save div. */ 693 697 mov tmp1, #0 694 698 ldr tmp2, [pmc, #AT91_PMC_PLL_CTRL0] ··· 762 758 str tmp1, [pmc, #AT91_PMC_PLL_UPDT] 763 759 764 760 /* step 2. */ 765 - ldr tmp1, =AT91_PMC_PLL_ACR_DEFAULT_PLLA 761 + ldr tmp1, .saved_acr 766 762 str tmp1, [pmc, #AT91_PMC_PLL_ACR] 767 763 768 764 /* step 3. */ ··· 1210 1206 .word 0 1211 1207 #endif 1212 1208 .saved_mckr: 1209 + .word 0 1210 + .saved_acr: 1213 1211 .word 0 1214 1212 .saved_pllar: 1215 1213 .word 0