diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2014-01-07 13:38:38 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-01-08 02:24:20 +0000 |
commit | 375e75de27813e0f440fefc45892157972e300dc (patch) | |
tree | f8601354ff05ac365865ffb906ac766c78a3b067 /power/tegra.c | |
parent | bd67ff773540ad5deaad2a16bfb8e916e9abad8b (diff) | |
download | chrome-ec-375e75de27813e0f440fefc45892157972e300dc.tar.gz |
nyan: use usleep() for PMIC_THERM_HOLD_TIME
It was udelay, which is busy-loop and other tasks have no chance to run.
usleep() could yield the CPU resource out.
BUG=None
BRANCH=nyan
TEST=other tasks get chance to run.
- Before:
[0.010242 not sysjump; forcing AP shutdown]
[0.060471 EC triggered warm reboot]
- After:
[0.010103 not sysjump; forcing AP shutdown]
[0.022985 event set 0x00000080]
[0.041828 Charge state init -> idle0 after 0.010393 sec]
[0.043327 Battery 98% / 1092h:15]
[0.060394 EC triggered warm reboot]
Change-Id: Id41a0b4fda5ac78b1b7f3e3f316b9721fcc3dd34
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/181763
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'power/tegra.c')
-rw-r--r-- | power/tegra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/power/tegra.c b/power/tegra.c index a6f3ebb639..c2a096db6c 100644 --- a/power/tegra.c +++ b/power/tegra.c @@ -381,7 +381,7 @@ void chipset_force_shutdown(void) /* Assert AP reset to shutdown immediately */ set_pmic_therm(1); - udelay(PMIC_THERM_HOLD_TIME); + usleep(PMIC_THERM_HOLD_TIME); set_pmic_therm(0); /* Hold the reset pin so that the AP stays in off mode (rev <= 2.0) */ |