Skip to content

Commit bc2e157

Browse files
raffi-gcarlescufi
authored andcommitted
riscv: irq: Correct CLIC_INTATTR_TRIG_Msk
The trig field of clicintattr is indeed in bits 2:1. However, the mask `CLIC_INTATTR_TRIG_Msk` is only applied directly to the bitfield `INTATTR.b.trg`. Therefore it doesn't have to be shifted additionally. Signed-off-by: Greter Raffael <[email protected]>
1 parent 1217656 commit bc2e157

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/interrupt_controller/intc_nuclei_eclic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ struct CLICCTRL {
8888
/** ECLIC Mode mask for MTVT CSR Register */
8989
#define ECLIC_MODE_MTVEC_Msk 3U
9090

91-
/** CLIC INTATTR: TRIG Position */
92-
#define CLIC_INTATTR_TRIG_Pos 1U
9391
/** CLIC INTATTR: TRIG Mask */
94-
#define CLIC_INTATTR_TRIG_Msk (0x3UL << CLIC_INTATTR_TRIG_Pos)
92+
#define CLIC_INTATTR_TRIG_Msk 0x3U
9593

9694
#define ECLIC_CFG (*((volatile union CLICCFG *)(DT_REG_ADDR_BY_IDX(DT_NODELABEL(eclic), 0))))
9795
#define ECLIC_INFO (*((volatile union CLICINFO *)(DT_REG_ADDR_BY_IDX(DT_NODELABEL(eclic), 1))))

0 commit comments

Comments
 (0)