diff options
| author | Ben Zong-You Xie <[email protected]> | 2026-07-28 16:10:38 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2026-09-01 10:46:23 +0530 |
| commit | 9ceaf4738a62ec990dcd0e797243bb6e78508291 (patch) | |
| tree | 7b5b93a0cee55a52a6517db64688e68fc23a53bf | |
| parent | 733867c0c8f4941a78144eb49d8e0c5d086d8567 (diff) | |
lib: utils/suspend: restore Andes CSRs on system-suspend resume
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/utils/suspend/fdt_suspend_andes_atcsmu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/suspend/fdt_suspend_andes_atcsmu.c b/lib/utils/suspend/fdt_suspend_andes_atcsmu.c index 072accc0..6722b70f 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 = { |
