[PATCH 4/7] lib: utils/suspend: restore Andes CSRs on system-suspend resume
Ben Zong-You Xie
ben717 at andestech.com
Tue Jul 28 01:10:38 PDT 2026
A deep sleep resume leaves the boot hart in SUSPENDED state, so
init_warmboot() dispatches to init_warm_resume(), which calls the SUSP
device's system_resume callback and not sbi_platform_early_init(). The
restore in ae350_early_init() is dead code on that path.
Fixes: b27ecec76b8a ("lib: utils/suspend: add Andes ATCSMU suspend driver")
Signed-off-by: Ben Zong-You Xie <ben717 at andestech.com>
---
lib/utils/suspend/fdt_suspend_andes_atcsmu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/utils/suspend/fdt_suspend_andes_atcsmu.c b/lib/utils/suspend/fdt_suspend_andes_atcsmu.c
index 072accc031a0..6722b70f0e6e 100644
--- a/lib/utils/suspend/fdt_suspend_andes_atcsmu.c
+++ b/lib/utils/suspend/fdt_suspend_andes_atcsmu.c
@@ -91,8 +91,10 @@ static void ae350_system_resume(void)
u32 hartid = current_hartid();
u32 sleep_type = atcsmu_get_sleep_type(hartid);
- if (sleep_type == SBI_SUSP_SLEEP_TYPE_SUSPEND)
+ if (sleep_type == SBI_SUSP_SLEEP_TYPE_SUSPEND) {
fdt_cmo_llc_enable(true);
+ ae350_non_ret_restore(sbi_scratch_thishart_ptr());
+ }
}
static struct sbi_system_suspend_device suspend_andes_atcsmu = {
--
2.34.1
More information about the opensbi
mailing list