Commit 33de32b3ebcb4f7f77f10a1b42493352f00c6a30
Committed by
Paul Walmsley
1 parent
71a488dbcc
Exists in
master
and in
4 other branches
OMAP4: PM: Do not assume clkdm supports hw transitions
omap_set_pwrdm_state today assumes a clkdm supports hw_auto transitions and hence leaves some which do not support this in sw wkup state preventing low power transitions. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff
arch/arm/mach-omap2/pm.c
... | ... | @@ -95,8 +95,7 @@ |
95 | 95 | |
96 | 96 | /* |
97 | 97 | * This sets pwrdm state (other than mpu & core. Currently only ON & |
98 | - * RET are supported. Function is assuming that clkdm doesn't have | |
99 | - * hw_sup mode enabled. | |
98 | + * RET are supported. | |
100 | 99 | */ |
101 | 100 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) |
102 | 101 | { |
... | ... | @@ -137,7 +136,10 @@ |
137 | 136 | |
138 | 137 | switch (sleep_switch) { |
139 | 138 | case FORCEWAKEUP_SWITCH: |
140 | - omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | |
139 | + if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) | |
140 | + omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | |
141 | + else | |
142 | + omap2_clkdm_sleep(pwrdm->pwrdm_clkdms[0]); | |
141 | 143 | break; |
142 | 144 | case LOWPOWERSTATE_SWITCH: |
143 | 145 | pwrdm_set_lowpwrstchange(pwrdm); |