From 863f661c6f6235525bcffc2b4b50a270128922fa Mon Sep 17 00:00:00 2001 From: Louis Yung-Chieh Lo Date: Tue, 6 May 2014 10:50:22 -0700 Subject: tegra: waits for battery stable before booting AP. This is a follow-up for CL 197990 and 197991. See issue tracker for more details. BUG=chrome-os-partner:28289 BRANCH=tot,nyan TEST=Copy from https://chromium-review.googlesource.com/#/c/197990 Going battery shipmode and plug-in AC, See booting and expect EC log: "[... battery initialized]" Disconnect battery, and plug-in and see booting and expect EC log: "[... battery not responding]" Change-Id: Ic218414c21057a971b478ec60e406f1eb69dd379 Signed-off-by: Louis Yung-Chieh Lo Reviewed-on: https://chromium-review.googlesource.com/198412 --- power/tegra.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/power/tegra.c b/power/tegra.c index cbf6f13ff0..1d7b24cb28 100644 --- a/power/tegra.c +++ b/power/tegra.c @@ -25,6 +25,7 @@ * */ +#include "battery.h" #include "charge_state.h" #include "chipset.h" /* This module implements chipset functions too */ #include "clock.h" @@ -263,6 +264,12 @@ enum power_state power_chipset_init(void) auto_power_on = 1; } + /* + * Some batteries use clock stretching feature, which requires + * more time to be stable. See http://crosbug.com/p/28289 + */ + battery_wait_for_stable(); + return init_power_state; } -- cgit v1.2.1