diff options
Diffstat (limited to 'include/sbi_utils')
-rw-r--r-- | include/sbi_utils/fdt/fdt_helper.h | 13 | ||||
-rw-r--r-- | include/sbi_utils/irqchip/plic.h | 14 |
2 files changed, 14 insertions, 13 deletions
diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 6be942a..42390e8 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -25,11 +25,6 @@ struct platform_uart_data { unsigned long reg_io_width; }; -struct platform_plic_data { - unsigned long addr; - unsigned long num_src; -}; - const struct fdt_match *fdt_match_node(void *fdt, int nodeoff, const struct fdt_match *match_table); @@ -52,11 +47,11 @@ int fdt_parse_uart8250_node(void *fdt, int nodeoffset, int fdt_parse_uart8250(void *fdt, struct platform_uart_data *uart, const char *compatible); -int fdt_parse_plic_node(void *fdt, int nodeoffset, - struct platform_plic_data *plic); +struct plic_data; + +int fdt_parse_plic_node(void *fdt, int nodeoffset, struct plic_data *plic); -int fdt_parse_plic(void *fdt, struct platform_plic_data *plic, - const char *compatible); +int fdt_parse_plic(void *fdt, struct plic_data *plic, const char *compat); int fdt_parse_compat_addr(void *fdt, unsigned long *addr, const char *compatible); diff --git a/include/sbi_utils/irqchip/plic.h b/include/sbi_utils/irqchip/plic.h index 68034be..0e56d80 100644 --- a/include/sbi_utils/irqchip/plic.h +++ b/include/sbi_utils/irqchip/plic.h @@ -12,12 +12,18 @@ #include <sbi/sbi_types.h> -int plic_warm_irqchip_init(int m_cntx_id, int s_cntx_id); +struct plic_data { + unsigned long addr; + unsigned long num_src; +}; -int plic_cold_irqchip_init(unsigned long base, u32 num_sources); +int plic_warm_irqchip_init(struct plic_data *plic, + int m_cntx_id, int s_cntx_id); -void plic_set_thresh(u32 cntxid, u32 val); +int plic_cold_irqchip_init(struct plic_data *plic); -void plic_set_ie(u32 cntxid, u32 word_index, u32 val); +void plic_set_thresh(struct plic_data *plic, u32 cntxid, u32 val); + +void plic_set_ie(struct plic_data *plic, u32 cntxid, u32 word_index, u32 val); #endif |