Skip to content

Commit b1cbdb0

Browse files
Santosh ShilimkarPaul Walmsley
authored andcommitted
OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
While using clockdomain force wakeup method, not waiting for powerdomain to be effectively ON may end up locking the clockdomain FSM until a next wakeup event occurs. One such issue was seen on OMAP4430, where L4_PER was periodically getting stuck in in-transition state when transitioning from from OSWR to ON. This issue was reported and investigated by Patrick Titiano <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Rajendra Nayak <[email protected]> Reported-by: Patrick Titiano <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Benoit Cousson <[email protected]> Cc: Paul Walmsley <[email protected]> [[email protected]: updated to apply; added transition wait on clkdm_deny_idle(); remove two superfluous pwrdm_wait_transition() calls] Signed-off-by: Paul Walmsley <[email protected]>
1 parent c956b75 commit b1cbdb0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm/mach-omap2/clockdomain.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ int clkdm_wakeup(struct clockdomain *clkdm)
747747
spin_lock_irqsave(&clkdm->lock, flags);
748748
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
749749
ret = arch_clkdm->clkdm_wakeup(clkdm);
750+
ret |= pwrdm_state_switch(clkdm->pwrdm.ptr);
750751
spin_unlock_irqrestore(&clkdm->lock, flags);
751752
return ret;
752753
}
@@ -818,6 +819,7 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
818819
spin_lock_irqsave(&clkdm->lock, flags);
819820
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
820821
arch_clkdm->clkdm_deny_idle(clkdm);
822+
pwrdm_state_switch(clkdm->pwrdm.ptr);
821823
spin_unlock_irqrestore(&clkdm->lock, flags);
822824
}
823825

arch/arm/mach-omap2/pm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
130130
} else {
131131
hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]);
132132
clkdm_wakeup(pwrdm->pwrdm_clkdms[0]);
133-
pwrdm_wait_transition(pwrdm);
134133
sleep_switch = FORCEWAKEUP_SWITCH;
135134
}
136135
}
@@ -156,7 +155,6 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
156155
return ret;
157156
}
158157

159-
pwrdm_wait_transition(pwrdm);
160158
pwrdm_state_switch(pwrdm);
161159
err:
162160
return ret;

0 commit comments

Comments
 (0)