mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 15:03:53 +02:00
ARM: at91: pm: fix MCKx restore routine
[ Upstream commit 296302d3d81360e09fa956e9be9edc8223b69a12 ]
The at91_mckx_ps_restore() assembly function is responsible for setting
back MCKx system bus clocks after exiting low power modes.
Fix a typo and use tmp3 variable instead of tmp2 to correctly set MCKx
to previously saved state.
Tmp2 was used without the needed changes in CSS and DIV. Moreover the
required bit 7, telling that MCR register's content is to be changed
(CMD/write), was not set.
Fix function comment to match tmp variables actually used.
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Fixes: 28eb1d40fe
("ARM: at91: pm: add support for MCK1..4 save/restore for ulp modes")
Link: https://lore.kernel.org/r/20250827145427.46819-3-nicolas.ferre@microchip.com
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
[claudiu.beznea: s/sate/state in commit description]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6e7dadc576
commit
6094b4fd63
|
@ -868,7 +868,7 @@ e_done:
|
|||
/**
|
||||
* at91_mckx_ps_restore: restore MCK1..4 settings
|
||||
*
|
||||
* Side effects: overwrites tmp1, tmp2
|
||||
* Side effects: overwrites tmp1, tmp2 and tmp3
|
||||
*/
|
||||
.macro at91_mckx_ps_restore
|
||||
#ifdef CONFIG_SOC_SAMA7
|
||||
|
@ -912,7 +912,7 @@ r_ps:
|
|||
bic tmp3, tmp3, #AT91_PMC_MCR_V2_ID_MSK
|
||||
orr tmp3, tmp3, tmp1
|
||||
orr tmp3, tmp3, #AT91_PMC_MCR_V2_CMD
|
||||
str tmp2, [pmc, #AT91_PMC_MCR_V2]
|
||||
str tmp3, [pmc, #AT91_PMC_MCR_V2]
|
||||
|
||||
wait_mckrdy tmp1
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user