From a29e6ebf6150bb509f24cbf01bd3a32d12522341 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 1 Jul 2005 11:40:48 -0700 Subject: [PATCH] ARM: OMAP: Sync pm.c dyntick call with mainline Sync pm.c dyntick call with mainline --- arch/arm/mach-omap/pm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap/pm.c b/arch/arm/mach-omap/pm.c index e234fde4172..61d9ec7f79f 100644 --- a/arch/arm/mach-omap/pm.c +++ b/arch/arm/mach-omap/pm.c @@ -90,10 +90,6 @@ void omap_pm_idle(void) } mask32 = omap_readl(ARM_SYSST); -#if defined(CONFIG_OMAP_32K_TIMER) && defined(CONFIG_NO_IDLE_HZ) - timer_dyn_reprogram(); -#endif - /* * Prevent the ULPD from entering low power state by setting * POWER_CTRL_REG:4 = 0 @@ -101,6 +97,13 @@ void omap_pm_idle(void) omap_writew(omap_readw(ULPD_POWER_CTRL) & ~ULPD_DEEP_SLEEP_TRANSITION_EN, ULPD_POWER_CTRL); + /* + * Since an interrupt may set up a timer, we don't want to + * reprogram the hardware timer with interrupts enabled. + * Re-enable interrupts only after returning from idle. + */ + timer_dyn_reprogram(); + if ((mask32 & DSP_IDLE) == 0) { __asm__ volatile ("mcr p15, 0, r0, c7, c0, 4"); } else -- 2.41.1