[PATCH 6/6] ARM: LPC32xx: irq.c: Clear latched event

Roland Stigge stigge at antcom.de
Sat Feb 11 12:18:28 EST 2012


This patch fixes the wakeup disable function by clearing latched events.

Signed-off-by: Roland Stigge <stigge at antcom.de>

Index: linux-2.6/arch/arm/mach-lpc32xx/irq.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-lpc32xx/irq.c	2012-02-11 15:13:33.000000000 +0100
+++ linux-2.6/arch/arm/mach-lpc32xx/irq.c	2012-02-11 15:14:53.000000000 +0100
@@ -309,9 +309,18 @@
 
 		if (state)
 			eventreg |= lpc32xx_events[d->irq].mask;
-		else
+		else {
 			eventreg &= ~lpc32xx_events[d->irq].mask;
 
+			/*
+			 * When disabling the wakeup, clear the latched
+			 * event
+			 */
+			__raw_writel(lpc32xx_events[d->irq].mask,
+				lpc32xx_events[d->irq].
+				event_group->rawstat_reg);
+		}
+
 		__raw_writel(eventreg,
 			lpc32xx_events[d->irq].event_group->enab_reg);
 



More information about the linux-arm-kernel mailing list