From 99e83ddc6ea74364e14409d1b5b687988a951bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 16 Apr 2025 13:12:23 +0200 Subject: [PATCH] [nrf fromlist] soc: nordic: nrf54h: Fix s2ram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cache was not enabled when s2ram did not completed which lead to system malfunction. Always power up cache when returning from s2ram function. Upstream PR #: 88709 Signed-off-by: Krzysztof Chruściński --- soc/nordic/nrf54h/pm_s2ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soc/nordic/nrf54h/pm_s2ram.c b/soc/nordic/nrf54h/pm_s2ram.c index c6ed87cbc3e..1ec5da4aa19 100644 --- a/soc/nordic/nrf54h/pm_s2ram.c +++ b/soc/nordic/nrf54h/pm_s2ram.c @@ -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);