diff --git a/drivers/interrupt_controller/intc_ite_it8xxx2.c b/drivers/interrupt_controller/intc_ite_it8xxx2.c index ab73c86ee76..a7800112228 100644 --- a/drivers/interrupt_controller/intc_ite_it8xxx2.c +++ b/drivers/interrupt_controller/intc_ite_it8xxx2.c @@ -122,6 +122,7 @@ void ite_intc_irq_disable(unsigned int irq) { uint32_t g, i; volatile uint8_t *en; + volatile uint8_t _ier __unused; if (irq > CONFIG_NUM_IRQS) { return; @@ -133,6 +134,11 @@ void ite_intc_irq_disable(unsigned int irq) /* critical section due to run a bit-wise OR operation */ unsigned int key = irq_lock(); CLEAR_MASK(*en, BIT(i)); + /* + * This load operation will guarantee the above modification of + * SOC's register can be seen by any following instructions. + */ + _ier = *en; irq_unlock(key); }