mask_irq(), unmask_irq() and specific_eoi() are provided by the
i8259 PIC driver and should be wrapped with CONFIG_I8259_PIC.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
irq_handlers[irq].arg = arg;
irq_handlers[irq].count = 0;
- unmask_irq(irq);
+ if (CONFIG_IS_ENABLED(I8259_PIC))
+ unmask_irq(irq);
if (status)
enable_interrupts();
status = disable_interrupts();
- mask_irq(irq);
+ if (CONFIG_IS_ENABLED(I8259_PIC))
+ mask_irq(irq);
irq_handlers[irq].handler = NULL;
irq_handlers[irq].arg = NULL;
}
if (irq_handlers[irq].handler) {
- mask_irq(irq);
+ if (CONFIG_IS_ENABLED(I8259_PIC))
+ mask_irq(irq);
irq_handlers[irq].handler(irq_handlers[irq].arg);
irq_handlers[irq].count++;
- unmask_irq(irq);
- specific_eoi(irq);
-
+ if (CONFIG_IS_ENABLED(I8259_PIC)) {
+ unmask_irq(irq);
+ specific_eoi(irq);
+ }
} else {
if ((irq & 7) != 7) {
spurious_irq_cnt++;