irqchip: sun4i: Fix irq 0 not working
commit56af0416b00f6edc7845a7b3f2ef179e385c8e15
authorHans de Goede <hdegoede@redhat.com>
Thu, 13 Mar 2014 18:03:52 +0000 (13 19:03 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 14 Mar 2014 12:43:33 +0000 (14 13:43 +0100)
tree26eaa832e994ace995b8643fcdfa194110cfb637
parent328a4978df833249b099c9875738d7b72042ffe1
irqchip: sun4i: Fix irq 0 not working

SUN4I_IRQ_VECTOR_REG containing 0 can mean one of 3 things:

1) no more irqs pending
2) irq 0 pending
3) spurious irq

So if we immediately get a reading of 0, check the irq-pending reg
to differentiate between 2 and 3. We only do this once to avoid
the extra check in the common case of 1) hapening after having
read the vector-reg once.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@googlegroups.com
Link: http://lkml.kernel.org/r/1394733834-26839-3-git-send-email-hdegoede@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/irqchip/irq-sun4i.c