diff options
author | Nishanth Menon <nm@ti.com> | 2011-10-06 20:19:45 -0500 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2011-10-10 15:51:36 -0700 |
commit | 11673a7e7ed6d763f9bb30570b88557ea328267d (patch) | |
tree | f2b42779d953f8fdaf0e7609e5cc5b1b14b794a5 /arch/arm/mach-omap2/vp.c | |
parent | 808183af3b3cbdc901e6660f8915927e69796778 (diff) | |
download | kernel_samsung_tuna-11673a7e7ed6d763f9bb30570b88557ea328267d.zip kernel_samsung_tuna-11673a7e7ed6d763f9bb30570b88557ea328267d.tar.gz kernel_samsung_tuna-11673a7e7ed6d763f9bb30570b88557ea328267d.tar.bz2 |
OMAP3+: PM: VP: check to ensure VP is idle before forceupdate
Ideally in the flow of programming, VP should be in idle state
(since we disabled it) before entering forceupdate. Ensure that
this is the case.
Change-Id: Ibdd9d213511ca9380d91d499ec83558d314d3185
Signed-off-by: Vinay Amancha <vinaykumar@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vp.c')
-rw-r--r-- | arch/arm/mach-omap2/vp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 3aa6e11..5cdeab7 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -126,6 +126,18 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm, u8 target_vsel, current_vsel; int ret, timeout = 0; + /* + * Wait for VP idle Typical latency is <2us. Maximum latency is ~100us + * This is an additional allowance to ensure we are in proper state + * to enter into forceupdate state transition. + */ + omap_test_timeout((voltdm->read(vp->vstatus)), VP_IDLE_TIMEOUT, + timeout); + + if (timeout >= VP_IDLE_TIMEOUT) + pr_warning("%s: vdd_%s idle timedout forceupdate(v=%ld)\n", + __func__, voltdm->name, target_volt); + ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, ¤t_vsel); if (ret) return ret; |