platform: generic/andes: add CSR save and restore functions for AE350 platform

Implement a save and restore mechanism for Andes-specific CSRs to support
hardware power-saving modes, such as CPU hotplug or suspend to RAM.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Link: https://lore.kernel.org/r/20251229071914.1451587-3-ben717@andestech.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Ben Zong-You Xie
2025-12-29 15:19:11 +08:00
committed by Anup Patel
parent 9ffacc8ae1
commit 85bff9cc16
3 changed files with 77 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ static int ae350_hart_stop(void)
if (rc)
return SBI_EFAIL;
ae350_non_ret_save(sbi_scratch_thishart_ptr());
ae350_disable_coherency();
wfi();
return 0;