diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index d48813fd62de..3feb35911a32 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -108,6 +108,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
108 | u32 cur_state; | 108 | u32 cur_state; |
109 | int sleep_switch = -1; | 109 | int sleep_switch = -1; |
110 | int ret = 0; | 110 | int ret = 0; |
111 | int hwsup = 0; | ||
111 | 112 | ||
112 | if (pwrdm == NULL || IS_ERR(pwrdm)) | 113 | if (pwrdm == NULL || IS_ERR(pwrdm)) |
113 | return -EINVAL; | 114 | return -EINVAL; |
@@ -127,6 +128,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
127 | (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { | 128 | (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { |
128 | sleep_switch = LOWPOWERSTATE_SWITCH; | 129 | sleep_switch = LOWPOWERSTATE_SWITCH; |
129 | } else { | 130 | } else { |
131 | hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]); | ||
130 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | 132 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); |
131 | pwrdm_wait_transition(pwrdm); | 133 | pwrdm_wait_transition(pwrdm); |
132 | sleep_switch = FORCEWAKEUP_SWITCH; | 134 | sleep_switch = FORCEWAKEUP_SWITCH; |
@@ -142,7 +144,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
142 | 144 | ||
143 | switch (sleep_switch) { | 145 | switch (sleep_switch) { |
144 | case FORCEWAKEUP_SWITCH: | 146 | case FORCEWAKEUP_SWITCH: |
145 | if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) | 147 | if (hwsup) |
146 | clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | 148 | clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); |
147 | else | 149 | else |
148 | clkdm_sleep(pwrdm->pwrdm_clkdms[0]); | 150 | clkdm_sleep(pwrdm->pwrdm_clkdms[0]); |