diff options
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/cpuidle34xx.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index e20332f4abdc..464cffde58fe 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -25,12 +25,12 @@ | |||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/cpuidle.h> | 26 | #include <linux/cpuidle.h> |
27 | #include <linux/export.h> | 27 | #include <linux/export.h> |
28 | #include <linux/cpu_pm.h> | ||
28 | 29 | ||
29 | #include <plat/prcm.h> | 30 | #include <plat/prcm.h> |
30 | #include <plat/irqs.h> | 31 | #include <plat/irqs.h> |
31 | #include "powerdomain.h" | 32 | #include "powerdomain.h" |
32 | #include "clockdomain.h" | 33 | #include "clockdomain.h" |
33 | #include <plat/serial.h> | ||
34 | 34 | ||
35 | #include "pm.h" | 35 | #include "pm.h" |
36 | #include "control.h" | 36 | #include "control.h" |
@@ -124,9 +124,23 @@ static int omap3_enter_idle(struct cpuidle_device *dev, | |||
124 | pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle); | 124 | pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle); |
125 | } | 125 | } |
126 | 126 | ||
127 | /* | ||
128 | * Call idle CPU PM enter notifier chain so that | ||
129 | * VFP context is saved. | ||
130 | */ | ||
131 | if (mpu_state == PWRDM_POWER_OFF) | ||
132 | cpu_pm_enter(); | ||
133 | |||
127 | /* Execute ARM wfi */ | 134 | /* Execute ARM wfi */ |
128 | omap_sram_idle(); | 135 | omap_sram_idle(); |
129 | 136 | ||
137 | /* | ||
138 | * Call idle CPU PM enter notifier chain to restore | ||
139 | * VFP context. | ||
140 | */ | ||
141 | if (pwrdm_read_prev_pwrst(mpu_pd) == PWRDM_POWER_OFF) | ||
142 | cpu_pm_exit(); | ||
143 | |||
130 | /* Re-allow idle for C1 */ | 144 | /* Re-allow idle for C1 */ |
131 | if (index == 0) { | 145 | if (index == 0) { |
132 | pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle); | 146 | pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle); |
@@ -245,11 +259,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, | |||
245 | struct omap3_idle_statedata *cx; | 259 | struct omap3_idle_statedata *cx; |
246 | int ret; | 260 | int ret; |
247 | 261 | ||
248 | if (!omap3_can_sleep()) { | ||
249 | new_state_idx = drv->safe_state_index; | ||
250 | goto select_state; | ||
251 | } | ||
252 | |||
253 | /* | 262 | /* |
254 | * Prevent idle completely if CAM is active. | 263 | * Prevent idle completely if CAM is active. |
255 | * CAM does not have wakeup capability in OMAP3. | 264 | * CAM does not have wakeup capability in OMAP3. |