ARM: OMAP: GPIO IRQ lazy IRQ disable fix
authorImre Deak <imre.deak@nokia.com>
Thu, 11 May 2006 13:13:42 +0000 (16:13 +0300)
committerJuha Yrjola <juha.yrjola@nokia.com>
Thu, 11 May 2006 13:13:42 +0000 (16:13 +0300)
commite829dc78d9908b3949c2994b331c5279049b9098
tree5dc74caddc6d3af554db38a3b8508120b08be397
parentc93034aee87c2e22f3e7c136e08e5830610cd083
ARM: OMAP: GPIO IRQ lazy IRQ disable fix

- The current OMAP GPIO IRQ framework doesn't use the do_edge_IRQ,
  do_level_IRQ handlers, but instead calls do_simple_IRQ. This
  doesn't handle disabled interrupts properly, so drivers will
  still get interrupts after calling disable_irq. The patch solves
  this by respecting the irq_desc.disable_depth and irq_desc.running
  counters.  When one of these is non-zero the handler is not called,
  the interrupt is masked and marked as pending. The pending interrupt
  will be serviced when the running handler returns. This is according
  to the same semantics as the standard do_edge_IRQ and do_level_IRQ
  handlers have, so one day we should use them instead of do_simple_IRQ.

- Process only interrupts that are not masked. The ISR may contain
  pending interrupts that are masked these shouldn't be processed.

- Move the bank IRQ unmasking out of the IRQ dispatch loop. If there
  are further iterations we shouldn't unmask it if there are level
  triggered interrupts pending.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@nokia.com>
arch/arm/plat-omap/gpio.c