diff options
author | Edward Hill <ecgh@chromium.org> | 2020-12-05 14:13:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-07 21:38:40 +0000 |
commit | 527cde447564514e237da26396236a8134310809 (patch) | |
tree | f024b065c8fda75123c09de44bb19887834b7bce | |
parent | 055007c09b1aa13e4a0d35042f6d366af98e0c43 (diff) | |
download | chrome-ec-527cde447564514e237da26396236a8134310809.tar.gz |
npcx: Don't delay hibernate wake by 2 seconds
Waking from PSL hibernate is power-on for EC but not for H1, so
we should not add the 2 second delay for CONFIG_BOARD_RESET_AFTER_POWER_ON
in this case.
BUG=b:173180800
BRANCH=zork
TEST=no 2 second delay on wake from hibernate
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ib0c8f2ca7f197626b20a11e21ace44a5046db18b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576439
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r-- | chip/npcx/gpio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chip/npcx/gpio.c b/chip/npcx/gpio.c index 23f4450ff7..dca7168009 100644 --- a/chip/npcx/gpio.c +++ b/chip/npcx/gpio.c @@ -524,10 +524,14 @@ void gpio_pre_init(void) * reset (2) will happen before the end of the delay so we avoid extra * output toggles. * + * Waking from PSL hibernate is power-on for EC but not for H1, so + * do not add delay. + * * Make sure to set up the timer before using udelay(). */ if (IS_ENABLED(CONFIG_BOARD_RESET_AFTER_POWER_ON) && - system_get_reset_flags() & EC_RESET_FLAG_INITIAL_PWR) { + system_get_reset_flags() & EC_RESET_FLAG_INITIAL_PWR + && !(system_get_reset_flags() & EC_RESET_FLAG_HIBERNATE)) { __hw_early_init_hwtimer(0); udelay(2 * SECOND); /* Shouldn't get here, but proceeding anyway... */ |