aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2012-03-12 10:34:32 -0400
committerPaul Walmsley <paul@pwsan.com>2012-04-04 16:44:13 -0400
commit8b8c3c7895dc8dcf60c58b23bc9231f4ee7887a2 (patch)
tree706ded1890ff1d21646dd631fd154380426a624d
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Commit b1cbdb00d ("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 <santosh.shilimkar@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Paul Walmsley <paul@pwsan.com> [paul@pwsan.com: added some more details in the commit log] Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r--arch/arm/mach-omap2/powerdomain.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 8a18d1bd61c..96ad3dbeac3 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
972 972
973int pwrdm_state_switch(struct powerdomain *pwrdm) 973int pwrdm_state_switch(struct powerdomain *pwrdm)
974{ 974{
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;
976} 982}
977 983
978int pwrdm_clkdm_state_switch(struct clockdomain *clkdm) 984int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)