diff options
author | Furquan Shaikh <furquan@google.com> | 2018-05-02 18:42:43 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-04 03:02:43 -0700 |
commit | 74d08a581d9f08cfa5b5c02ad56267384fb42c9b (patch) | |
tree | 2fb4cffd1d39e2f271cfe83796d59cf07b9c819a | |
parent | 756141d6b92b0cffe7fca4226f096151af149bee (diff) | |
download | chrome-ec-74d08a581d9f08cfa5b5c02ad56267384fb42c9b.tar.gz |
yorp: Shutdown AP when doing hibernate
When hibernate is run from EC console or using key combo, AP might not
actually be in shutdown state. Thus, add a call to force chipset
shutdown in board_hibernate and let AP drop down to S5.
BUG=b:79171681
BRANCH=None
TEST=Verified that hibernate with AP in S0 does not result in EC
waking back up.
Change-Id: I4103c51afb42944e05ec3965b421730fac3f867a
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1041278
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
-rw-r--r-- | board/yorp/board.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index 0c665443bf..a688d5d192 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -202,6 +202,18 @@ static void board_chipset_suspend(void) DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); +void board_hibernate(void) +{ + /* + * To support hibernate called from console commands, ectool commands + * and key sequence, shutdown the AP before hibernating. + */ + chipset_force_shutdown(); + + /* Added delay to allow AP power state machine to settle down */ + msleep(100); +} + enum adc_channel board_get_vbus_adc(int port) { return port ? ADC_VBUS_C1 : ADC_VBUS_C0; |