Skip to content

Commit 8b8c3c7

Browse files
Santosh ShilimkarPaul Walmsley
authored andcommitted
ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Commit b1cbdb0 ("OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup") was assuming that pwrdm_state_switch() does wait for the powerdomain transition which is not the case. The missing wait for the powerdomain transition violates the sequence which the hardware expects, which causes power management failures on some devices. Fix this API by adding the pwrdm_wait_transition(). Signed-off-by: Santosh Shilimkar <[email protected]> Cc: Rajendra Nayak <[email protected]> Cc: Paul Walmsley <[email protected]> [[email protected]: added some more details in the commit log] Signed-off-by: Paul Walmsley <[email protected]>
1 parent dd775ae commit 8b8c3c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

arch/arm/mach-omap2/powerdomain.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
972972

973973
int pwrdm_state_switch(struct powerdomain *pwrdm)
974974
{
975-
return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
975+
int ret;
976+
977+
ret = pwrdm_wait_transition(pwrdm);
978+
if (!ret)
979+
ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
980+
981+
return ret;
976982
}
977983

978984
int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)

0 commit comments

Comments
 (0)