diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2015-01-15 16:38:05 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-16 03:30:54 +0000 |
commit | 0747b700fa4ee7ee2a22560d76f5eb2afb822591 (patch) | |
tree | b9dbb65e04d92a10b01dd29ed3f759db71790234 | |
parent | 29e3a2761a38f2e2d680ae5cbec6a9b01b02f8d8 (diff) | |
download | chrome-ec-0747b700fa4ee7ee2a22560d76f5eb2afb822591.tar.gz |
samus: Move delay for booting without a battery
In the samus power sequence steps there is a delay of 500ms when
booting without a battery attached. This delay is currently set
to happen in the S5->S3 transition time, which seems to confuse
sequencing on some boards as we have already set DPWROK and
RSMRST and so this 500ms delay can mess up timing.
Move this delay to happen after 5V is up but before any of the
triggers to the chipset to start sequencing are set.
BUG=chrome-os-partner:31583
BRANCH=samus
TEST=boot on samus pre-DVT and DVT without a battery
Change-Id: I9519c336b121c86183c8368282f6c94b32987c16
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/241180
Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r-- | board/samus/power_sequence.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/board/samus/power_sequence.c b/board/samus/power_sequence.c index ea3be48c90..79bd6d6783 100644 --- a/board/samus/power_sequence.c +++ b/board/samus/power_sequence.c @@ -268,6 +268,17 @@ enum power_state power_handle_state(enum power_state state) } } + /* + * TODO(crosbug.com/p/31583): Temporary hack to allow booting + * without battery. If battery is not present here, then delay + * to give time for PD MCU to negotiate to 20V. + */ + battery_get_params(&batt); + if (batt.is_present != BP_YES && !system_is_locked()) { + CPRINTS("Attempting boot w/o battery, adding delay"); + msleep(500); + } + /* Assert DPWROK */ gpio_set_level(GPIO_PCH_DPWROK, 1); @@ -304,17 +315,6 @@ enum power_state power_handle_state(enum power_state state) return POWER_S5; case POWER_S5S3: - /* - * TODO(crosbug.com/p/31583): Temporary hack to allow booting - * without battery. If battery is not present here, then delay - * to give time for PD MCU to negotiate to 20V. - */ - battery_get_params(&batt); - if (batt.is_present != BP_YES && !system_is_locked()) { - CPRINTS("Attempting boot w/o battery, adding delay"); - msleep(500); - } - /* Turn on power to RAM */ gpio_set_level(GPIO_PP1800_EN, 1); gpio_set_level(GPIO_PP1200_EN, 1); |