mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: irqchip/plic: Add context save/restore helpers
These can be used by platform code to save the PLIC context state, if it would otherwise be lost during non-retentive suspend. The platform is responsible for allocating all necessary storage. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:

committed by
Anup Patel

parent
8c362e7d06
commit
415ecf28f7
@@ -17,6 +17,12 @@ struct plic_data {
|
||||
unsigned long num_src;
|
||||
};
|
||||
|
||||
void plic_context_save(const struct plic_data *plic, int context_id,
|
||||
u32 *enable, u32 *threshold);
|
||||
|
||||
void plic_context_restore(const struct plic_data *plic, int context_id,
|
||||
const u32 *enable, u32 threshold);
|
||||
|
||||
int plic_context_init(const struct plic_data *plic, int context_id,
|
||||
bool enable, u32 threshold);
|
||||
|
||||
|
Reference in New Issue
Block a user