diff options
author | Wonjoon Lee <woojoo.lee@samsung.com> | 2014-04-29 20:13:55 +0900 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-30 20:55:37 +0000 |
commit | 1cd618e30d4dbf188c7913376a1794eecfe00c43 (patch) | |
tree | dd179bd8cd8d918035cbecbd6de0622cfa96597f | |
parent | 2dce1bf3390546d5ca0c98dcbf9004e2bc59a1eb (diff) | |
download | chrome-ec-1cd618e30d4dbf188c7913376a1794eecfe00c43.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: Ib758716fd5dc7782cd413b68b4c906e7a112dc6e
Signed-off-by: Wonjoon Lee <woojoo.lee@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/197502
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org>
-rw-r--r-- | common/chipset_gaia.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/chipset_gaia.c b/common/chipset_gaia.c index 310e1b50cc..f5b1b13873 100644 --- a/common/chipset_gaia.c +++ b/common/chipset_gaia.c @@ -38,6 +38,7 @@ #include "task.h" #include "timer.h" #include "util.h" +#include "smart_battery.h" /* Console output macros */ #define CPUTS(outstr) cputs(CC_CHIPSET, outstr) @@ -616,6 +617,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 */ |