Skip to content

Commit b15f942

Browse files
committed
drivers: intc_wch_pfic: correct/optimize interrupt disable logic
The IRER registers are write-only and clear the enable bit for the provided interrupt. Use a direct write instead of a read/modify/write sequence to avoid generating a bogus read access and improve performance Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 7189ade commit b15f942

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/interrupt_controller/intc_wch_pfic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void arch_irq_enable(unsigned int irq)
2323

2424
void arch_irq_disable(unsigned int irq)
2525
{
26-
PFIC->IRER[irq / 32] |= 1 << (irq % 32);
26+
PFIC->IRER[irq / 32] = 1 << (irq % 32);
2727
}
2828

2929
int arch_irq_is_enabled(unsigned int irq)

0 commit comments

Comments
 (0)