OMAP3: PM: Ack pending interrupts before entering suspend
authorTero Kristo <tero.kristo@nokia.com>
Fri, 23 Oct 2009 16:03:48 +0000 (19:03 +0300)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 21 Jan 2010 02:15:58 +0000 (18:15 -0800)
Suspending drivers may still generate interrupts just before their suspend is
completed. Any pending interrupts here will prevent sleep.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/plat-omap/include/plat/irqs.h

index e9bc782fa414fad906db2740ac274d119910f894..54c5f0dcd6637d2ebdd008dcc5c0a59d96a84c21 100644 (file)
@@ -274,4 +274,10 @@ void omap_intc_restore_context(void)
        }
        /* MIRs are saved and restore with other PRCM registers */
 }
+
+void omap3_intc_suspend(void)
+{
+       /* A pending interrupt would prevent OMAP from entering suspend */
+       omap_ack_irq(0);
+}
 #endif /* CONFIG_ARCH_OMAP3 */
index c6cc809afb790fa5a0624f5a3e2f118c4aba3fa3..b26418d55076ba27d7c0c2fbf9f75617c554ceba 100644 (file)
@@ -578,6 +578,8 @@ static int omap3_pm_suspend(void)
        }
 
        omap_uart_prepare_suspend();
+       omap3_intc_suspend();
+
        omap_sram_idle();
 
 restore:
index 97d6c50c3dcb00b24d1d43551e6a4a3b8402621f..0082036f6a48f5fa100e2753399f3644cbb62ea7 100644 (file)
@@ -499,6 +499,7 @@ extern void omap_init_irq(void);
 extern int omap_irq_pending(void);
 void omap_intc_save_context(void);
 void omap_intc_restore_context(void);
+void omap3_intc_suspend(void);
 #endif
 
 #include <mach/hardware.h>