mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-06-27 08:38:36 +00: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:
parent
8c362e7d06
commit
415ecf28f7
2 changed files with 54 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue