summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Yung-Chieh Lo <yjlou@chromium.org>2014-05-06 10:50:22 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-09 08:26:13 +0000
commit863f661c6f6235525bcffc2b4b50a270128922fa (patch)
tree0e4458bb5e44b4d30d3d8ca3927f3083256ca33d
parent73b8292d76612263b0666606357609483b435f42 (diff)
downloadchrome-ec-863f661c6f6235525bcffc2b4b50a270128922fa.tar.gz
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 <yjlou@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/198412
-rw-r--r--power/tegra.c7
1 files changed, 7 insertions, 0 deletions
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;
}