Skip to content

Commit 7afbcdc

Browse files
ycsincarlescufi
authored andcommitted
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 <[email protected]>
1 parent fa0bbaf commit 7afbcdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/interrupt_controller/intc_plic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#define PLIC_IRQS (CONFIG_NUM_IRQS - CONFIG_2ND_LVL_ISR_TBL_OFFSET)
3030
#define PLIC_EN_SIZE ((PLIC_IRQS >> 5) + 1)
3131

32-
#define PLIC_EDGE_TRIG_TYPE (PLIC_MAX_PRIO + DT_INST_PROP(0, riscv_trigger_reg_offset))
32+
#define PLIC_EDGE_TRIG_TYPE (DT_INST_REG_ADDR(0) + DT_INST_PROP(0, riscv_trigger_reg_offset))
3333
#define PLIC_EDGE_TRIG_SHIFT 5
3434

3535
struct plic_regs_t {

0 commit comments

Comments
 (0)