]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Sync pm.c dyntick call with mainline
authorTony Lindgren <tony@atomide.com>
Fri, 1 Jul 2005 18:40:48 +0000 (11:40 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 1 Jul 2005 18:40:48 +0000 (11:40 -0700)
Sync pm.c dyntick call with mainline

arch/arm/mach-omap/pm.c

index e234fde417200d30dc45b6f4ce3d94ca27608218..61d9ec7f79f356bbb6a5954585999262c303fbfe 100644 (file)
@@ -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