ARM: irq: Do not clear pending IRQ when enabling them.

Do not clear pending IRQ when enabling an IRQ on ARM
architectures. Peripherals and S/W ISRs may be required to
be deferred until they are enabled later and the pended
IRQ should be retained for the ISR to be vectored to when
enabled.

Change-id: I808183018d8a2cc58390a1de3b4797b2bb7c6ec9
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
Vinayak Chettimada 2016-09-01 20:44:36 +02:00 committed by Andrew Boie
commit bbeb7030a4

View file

@ -39,16 +39,13 @@ extern void __reserved(void);
* *
* @brief Enable an interrupt line * @brief Enable an interrupt line
* *
* Clear possible pending interrupts on the line, and enable the interrupt * Enable the interrupt. After this call, the CPU will receive interrupts for
* line. After this call, the CPU will receive interrupts for the specified * the specified <irq>.
* <irq>.
* *
* @return N/A * @return N/A
*/ */
void _arch_irq_enable(unsigned int irq) void _arch_irq_enable(unsigned int irq)
{ {
/* before enabling interrupts, ensure that interrupt is cleared */
_NvicIrqUnpend(irq);
_NvicIrqEnable(irq); _NvicIrqEnable(irq);
} }