提交 abbea718 编写于 作者: A Andrew Victor 提交者: Russell King

[ARM] 3348/1: Disable GPIO interrupts

Patch from Andrew Victor

disable_irq() lazily disables the interrupt, so the IRQ is only disabled
once the interrupt occurs again.  The GPIO interrupt handler therefore
must first check disable_depth to see if the IRQ needs to be disabled.

Orignal patch by Bill Gatliff.
Signed-off-by: NAndrew Victor <andrew@sanpeople.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 f52ee141
...@@ -274,8 +274,18 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs ...@@ -274,8 +274,18 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
gpio = &irq_desc[pin]; gpio = &irq_desc[pin];
while (isr) { while (isr) {
if (isr & 1) if (isr & 1) {
gpio->handle(pin, gpio, regs); if (unlikely(gpio->disable_depth)) {
/*
* The core ARM interrupt handler lazily disables IRQs so
* another IRQ must be generated before it actually gets
* here to be disabled on the GPIO controller.
*/
gpio_irq_mask(pin);
}
else
gpio->handle(pin, gpio, regs);
}
pin++; pin++;
gpio++; gpio++;
isr >>= 1; isr >>= 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册