drivers: intc: plic: fix the calculation of trig register

trig register should be independent of the `riscv,max-priority` property.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
Yong Cong Sin 2023-09-12 21:24:41 +08:00 committed by Carles Cufí
commit 7afbcdc619

View file

@ -29,7 +29,7 @@
#define PLIC_IRQS (CONFIG_NUM_IRQS - CONFIG_2ND_LVL_ISR_TBL_OFFSET)
#define PLIC_EN_SIZE ((PLIC_IRQS >> 5) + 1)
#define PLIC_EDGE_TRIG_TYPE (PLIC_MAX_PRIO + DT_INST_PROP(0, riscv_trigger_reg_offset))
#define PLIC_EDGE_TRIG_TYPE (DT_INST_REG_ADDR(0) + DT_INST_PROP(0, riscv_trigger_reg_offset))
#define PLIC_EDGE_TRIG_SHIFT 5
struct plic_regs_t {