diff options
| author | Samuel Holland <[email protected]> | 2024-11-04 20:10:02 -0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-11-28 09:35:10 +0530 |
| commit | a786aed08dbc20368426970eaf393867ec88b940 (patch) | |
| tree | a59412e89f6c9b920167df86ad03736f5128a767 /include/sbi_utils | |
| parent | 86d2c1797a44975e628bcf77e30e687fd6738e81 (diff) | |
lib: utils/irqchip: plic: Allow enabling IRQs by default
Unlike other platforms, Ariane and OpenPiton enable all IRQs by default.
This was described in commit b44e844880d0 ("Add support for Ariane FPGA
SoC") as "due to some issue of the design." Add this workaround behind a
flag in plic_warm_irqchip_init(), so every platform can use the same
warm init function.
Signed-off-by: Samuel Holland <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include/sbi_utils')
| -rw-r--r-- | include/sbi_utils/irqchip/plic.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/sbi_utils/irqchip/plic.h b/include/sbi_utils/irqchip/plic.h index 2eda6310..5da09055 100644 --- a/include/sbi_utils/irqchip/plic.h +++ b/include/sbi_utils/irqchip/plic.h @@ -16,8 +16,12 @@ struct plic_data { unsigned long addr; unsigned long size; unsigned long num_src; + unsigned long flags; }; +/** Work around a bug on Ariane that requires enabling interrupts at boot */ +#define PLIC_FLAG_ARIANE_BUG BIT(0) + /* So far, priorities on all consumers of these functions fit in 8 bits. */ void plic_priority_save(const struct plic_data *plic, u8 *priority, u32 num); @@ -30,9 +34,6 @@ void plic_context_save(const struct plic_data *plic, int context_id, void plic_context_restore(const struct plic_data *plic, int context_id, const u32 *enable, u32 threshold, u32 num); -int plic_context_init(const struct plic_data *plic, int context_id, - bool enable, u32 threshold); - int plic_warm_irqchip_init(const struct plic_data *plic, int m_cntx_id, int s_cntx_id); |
