soc: nordic: nrf54h: Fix s2ram

Cache was not enabled when s2ram did not completed which
lead to system malfunction. Always power up cache when
returning from s2ram function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2025-04-16 13:12:23 +02:00 committed by Fabio Baltieri
commit 08d327d595

View file

@ -167,12 +167,12 @@ int soc_s2ram_suspend(pm_s2ram_system_off_fn_t system_off)
nvic_suspend(&backup_data.nvic_context);
mpu_suspend(&backup_data.mpu_context);
ret = arch_pm_s2ram_suspend(system_off);
/* Cache is powered down so power up is needed even if s2ram failed. */
nrf_power_up_cache();
if (ret < 0) {
return ret;
}
nrf_power_up_cache();
mpu_resume(&backup_data.mpu_context);
nvic_resume(&backup_data.nvic_context);
scb_resume(&backup_data.scb_context);