From 7afbcdc619965a4687ee3243ecc5e349cba75756 Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Tue, 12 Sep 2023 21:24:41 +0800 Subject: [PATCH] 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 --- drivers/interrupt_controller/intc_plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interrupt_controller/intc_plic.c b/drivers/interrupt_controller/intc_plic.c index 67a5313287c..fe061b89b0a 100644 --- a/drivers/interrupt_controller/intc_plic.c +++ b/drivers/interrupt_controller/intc_plic.c @@ -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 {