]> git.dujemihanovic.xyz Git - u-boot.git/commit
ARM: stm32: Jump to ep on successful resume in PSCI suspend code
authorMarek Vasut <marex@denx.de>
Sun, 7 Apr 2024 20:21:07 +0000 (22:21 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 19 Apr 2024 09:31:48 +0000 (11:31 +0200)
commit3242dd0ac91ea4fd9cf516f0d196a34ea23367de
tree76838f65c9e65899d5a9ff9c2fbd583167555e1b
parent1ef28c58d2dbd8c7d65e28ef500bfd359c66c07f
ARM: stm32: Jump to ep on successful resume in PSCI suspend code

In case the system has resumed successfully, the PSCI suspend resume
code has to jump to the 'ep' successful resume entry point code path,
otherwise the code has to jump to content of the LR register, which
points to failed resume code path.

To implement this distinction, rewrite LR register stored on stack
with 'ep' value in case of a successful resume, which is really in
every case unless some catastrophic failure occurred during suspend.

Without this change, Linux counts every resume as failed in
/sys/power/suspend_stats/fail

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/stm32mp1/psci.c