[dev][interrupt][riscv_plic] merge now 3 implementations of the same plic driver into one

Move a copy of the PLIC driver out of one of the platforms and make the
setup of the interrupt controller a bit more dynamic.
This commit is contained in:
Travis Geiselbrecht
2023-03-09 23:09:32 -08:00
parent c66ad44efa
commit 7c2c8d8e56
19 changed files with 117 additions and 278 deletions

View File

@@ -20,9 +20,3 @@
#define PWM0_BASE 0x10020000
#define PWM1_BASE 0x10021000
#define GPIO_BASE 0x10060000
#if RISCV_XMODE_OFFSET == RISCV_MACH_OFFSET
#define PLIC_HART_IDX(hart) ((hart) ? ((2 * (hart)) - 1) : 0)
#elif RISCV_XMODE_OFFSET == RISCV_SUPER_OFFSET
#define PLIC_HART_IDX(hart) ((hart) ? (2 * (hart)) : ~0U)
#endif