summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-02-27 17:28:02 +0100
committerRoland Stigge <stigge@antcom.de>2012-02-27 17:28:02 +0100
commit94ed7830cba4dce57b18a2926b5d826bfd184bd6 (patch)
tree19d87713e400e53237b70d03e138ad207b9b1d2b /arch/arm/mach-lpc32xx
parent35dd0a75d4a382e7f769dd0277732e7aa5235718 (diff)
ARM: LPC32xx: irq.c: Clear latched event
This patch fixes the wakeup disable function by clearing latched events. Signed-off-by: Roland Stigge <stigge@antcom.de> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/arm/mach-lpc32xx')
-rw-r--r--arch/arm/mach-lpc32xx/irq.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c
index d3bf9c11fd6..c74de01ab5b 100644
--- a/arch/arm/mach-lpc32xx/irq.c
+++ b/arch/arm/mach-lpc32xx/irq.c
@@ -309,9 +309,18 @@ static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state)
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);