Skip to content

Commit

Permalink
ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_st…
Browse files Browse the repository at this point in the history
…ate_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]>
  • Loading branch information
Santosh Shilimkar authored and Paul Walmsley committed Apr 4, 2012
1 parent dd775ae commit 8b8c3c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/arm/mach-omap2/powerdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)

int pwrdm_state_switch(struct powerdomain *pwrdm)
{
return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
int ret;

ret = pwrdm_wait_transition(pwrdm);
if (!ret)
ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);

return ret;
}

int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)
Expand Down

0 comments on commit 8b8c3c7

Please sign in to comment.