aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2008-10-28 20:30:07 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-11 17:42:49 -0500
commitc98e223006ffd4c5e4cd0f75c5a10bd2b45508d5 (patch)
tree13517765baa81f1140612bd4532cd6933c3cbc16 /arch
parent20b01669885483ba2102d5a71c662bb6ae1bed0b (diff)
OMAP3: PM: CPUidle: obey enable_off_mode flag
If 'enable_off_mode' is not set, force powerdomain states to RET instead of OFF. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 0bf1bc359ea8..1120494064d5 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -29,6 +29,8 @@
29#include <plat/irqs.h> 29#include <plat/irqs.h>
30#include <plat/control.h> 30#include <plat/control.h>
31 31
32#include "pm.h"
33
32#ifdef CONFIG_CPU_IDLE 34#ifdef CONFIG_CPU_IDLE
33 35
34#define OMAP3_MAX_STATES 7 36#define OMAP3_MAX_STATES 7
@@ -74,6 +76,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
74{ 76{
75 struct omap3_processor_cx *cx = cpuidle_get_statedata(state); 77 struct omap3_processor_cx *cx = cpuidle_get_statedata(state);
76 struct timespec ts_preidle, ts_postidle, ts_idle; 78 struct timespec ts_preidle, ts_postidle, ts_idle;
79 u32 mpu_state = cx->mpu_state, core_state = cx->core_state;
77 80
78 current_cx_state = *cx; 81 current_cx_state = *cx;
79 82
@@ -83,8 +86,15 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
83 local_irq_disable(); 86 local_irq_disable();
84 local_fiq_disable(); 87 local_fiq_disable();
85 88
86 set_pwrdm_state(mpu_pd, cx->mpu_state); 89 if (!enable_off_mode) {
87 set_pwrdm_state(core_pd, cx->core_state); 90 if (mpu_state < PWRDM_POWER_RET)
91 mpu_state = PWRDM_POWER_RET;
92 if (core_state < PWRDM_POWER_RET)
93 core_state = PWRDM_POWER_RET;
94 }
95
96 set_pwrdm_state(mpu_pd, mpu_state);
97 set_pwrdm_state(core_pd, core_state);
88 98
89 if (omap_irq_pending()) 99 if (omap_irq_pending())
90 goto return_sleep_time; 100 goto return_sleep_time;