]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP3: ack spurious IRQs in get_irqnr_and_base
authorLauri Leukkunen <lauri.leukkunen@nokia.com>
Wed, 15 Oct 2008 11:51:51 +0000 (14:51 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 17 Oct 2008 21:18:03 +0000 (14:18 -0700)
This prevents spurious interrupts from repeating unacked and
thus locking the system, while still allowing the spurious
bad irq error message to be show on console.

Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/include/mach/entry-macro.S

index a8fca9d9845b00102ba036958736452a78b89a54..c88a4cb52e2dc206a43d5229230f789ac614b82e 100644 (file)
                ldr     \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
                cmp     \irqnr, #0x0
 2222:
-               ldrne   \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
+#if defined(CONFIG_ARCH_OMAP34XX)
+               mov     \tmp, \irqnr
+#endif
+               ldrne   \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
+#if defined(CONFIG_ARCH_OMAP34XX)
+               mov     \irqstat, \irqnr
+               bic     \irqstat, \irqstat, #0x7f /* check for spurious flag */
+               cmp     \irqstat, #0x0
+               beq     2223f
+               mov     \irqstat, #0x1 /* Ack the spurious irq, this lets it
+                                       * generate a bad irq error message,
+                                       * but prevents infinitely repeating
+                                       * irq.
+                                       */
+               str     \irqstat, [\base, #0x48] /* INTC_CONTROL register */
+2223:
+               cmp     \tmp, #0x0 /* set conditional back to what it was
+                                   * before spurious test
+                                   */
+#endif
 
                .endm