Skip to content

Commit 3cae7d1

Browse files
noglitchclaudiubeznea
authored andcommitted
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>
1 parent 296302d commit 3cae7d1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

arch/arm/mach-at91/pm_suspend.S

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,10 @@ sr_dis_exit:
689689
bic tmp2, tmp2, #AT91_PMC_PLL_UPDT_ID
690690
str tmp2, [pmc, #AT91_PMC_PLL_UPDT]
691691

692+
/* save acr */
693+
ldr tmp2, [pmc, #AT91_PMC_PLL_ACR]
694+
str tmp2, .saved_acr
695+
692696
/* save div. */
693697
mov tmp1, #0
694698
ldr tmp2, [pmc, #AT91_PMC_PLL_CTRL0]
@@ -758,7 +762,7 @@ sr_dis_exit:
758762
str tmp1, [pmc, #AT91_PMC_PLL_UPDT]
759763

760764
/* step 2. */
761-
ldr tmp1, =AT91_PMC_PLL_ACR_DEFAULT_PLLA
765+
ldr tmp1, .saved_acr
762766
str tmp1, [pmc, #AT91_PMC_PLL_ACR]
763767

764768
/* step 3. */
@@ -1207,6 +1211,8 @@ ENDPROC(at91_pm_suspend_in_sram)
12071211
#endif
12081212
.saved_mckr:
12091213
.word 0
1214+
.saved_acr:
1215+
.word 0
12101216
.saved_pllar:
12111217
.word 0
12121218
.saved_sam9_lpr:

0 commit comments

Comments
 (0)