intc/xilinx_intc: Don't clear level sens. IRQs without ACK
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Tue, 11 Jun 2013 00:58:25 +0000 (10:58 +1000)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Tue, 18 Jun 2013 07:44:59 +0000 (09:44 +0200)
For level sensitive interrupts, ISR bits are cleared when the input pin
is lowered. This is incorrect. Only software can clear ISR bits (via
IAR or direct write to ISR with !MER(2)).

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/intc/xilinx_intc.c

index 5df7008e2fdc4d802fc74ef143841ac789df8fc7..d243a0015ff7868f6f79e488e756925c86901f9f 100644 (file)
@@ -135,13 +135,7 @@ static void irq_handler(void *opaque, int irq, int level)
         return;
     }
 
-    /* Update source flops. Don't clear unless level triggered.
-       Edge triggered interrupts only go away when explicitely acked to
-       the interrupt controller.  */
-    if (!(p->c_kind_of_intr & (1 << irq)) || level) {
-        p->regs[R_ISR] &= ~(1 << irq);
-        p->regs[R_ISR] |= (level << irq);
-    }
+    p->regs[R_ISR] |= (level << irq);
     update_irq(p);
 }