lib: utils/irqchip: Add APLIC restore function

Since the APLIC may enter a reset state upon system wake-up from a
platform low power state, adding a restore function to reinitialize
the APLIC.

Reviewed-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Cyan Yang <cyan.yang@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Nick Hu <nick.hu@sifive.com>
Link: https://lore.kernel.org/r/20251020-cache-upstream-v7-7-69a132447d8a@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Nick Hu
2025-10-20 14:34:09 +08:00
committed by Anup Patel
parent 64904e5d5c
commit c2d2b9140a
2 changed files with 104 additions and 73 deletions

View File

@ -33,6 +33,7 @@ struct aplic_delegate_data {
struct aplic_data {
/* Private members */
struct sbi_irqchip_device irqchip;
struct sbi_dlist node;
/* Public members */
unsigned long addr;
unsigned long size;
@ -48,4 +49,6 @@ struct aplic_data {
int aplic_cold_irqchip_init(struct aplic_data *aplic);
void aplic_reinit_all(void);
#endif