diff options
author | Wonjoon Lee <woojoo.lee@samsung.com> | 2014-05-02 19:34:49 +0900 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-05-08 08:35:41 +0000 |
commit | da5b8fa6c79807a8ea69258f43f60f742fb9246d (patch) | |
tree | 6010bdc2f4e0bf0aeabe2291435a7e43fdbd34ba | |
parent | 0a166c0467c45d5df90263d00b359b6a2cae8bc6 (diff) | |
download | chrome-ec-da5b8fa6c79807a8ea69258f43f60f742fb9246d.tar.gz |
Wait for battery boot-up
Some battery uses clock stretching feature, and this could disturb
PMU communication before battery going stable.
AP does not know and will attempt PMU setting, and could get fail
For various battery indicates usually 1s for stable
(even if it is much less in real world 200ms~700ms)
Let's checking 'battery is ready' when first pump-up power.
BUG=chrome-os-partner:28289
TEST=Going battery shipmode and plug-in AC, See booting and EC log
Disconnect battery, and plug-in and see booting and EC log
Change-Id: I9b62266132d5322366265afe03adbe0db1f9ae75
Signed-off-by: Wonjoon Lee <woojoo.lee@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/197991
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
-rw-r--r-- | power/gaia.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/power/gaia.c b/power/gaia.c index b1d4f9a645..d115e2d52c 100644 --- a/power/gaia.c +++ b/power/gaia.c @@ -23,6 +23,7 @@ * - If XPSHOLD is dropped by the AP, then we power the AP off */ +#include "battery.h" #include "clock.h" #include "chipset.h" /* This module implements chipset functions too */ #include "common.h" @@ -642,6 +643,7 @@ void chipset_task(void) gaia_power_init(); ap_on = 0; + battery_wait_for_stable(); while (1) { /* Wait until we need to power on, then power on */ |