]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: at91: pm: fix MCKx restore routine
authorNicolas Ferre <nicolas.ferre@microchip.com>
Wed, 27 Aug 2025 14:54:26 +0000 (16:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:27 +0000 (11:56 +0200)
commit6094b4fd63757af060332d7022f98082a711fe55
tree488c5e3990e2c739e367555cc4fdc798881b34ac
parent6e7dadc5763c48eb3b9b91265a21f312599ebb2c
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: 28eb1d40fe57 ("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>
arch/arm/mach-at91/pm_suspend.S