diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-10-31 09:39:01 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-01 02:17:55 -0700 |
commit | 78c4b5277f437435fafeebb79ca7d349a966177b (patch) | |
tree | e4d3f60704dc2efcd4e3d29319154ffd2331f94b /power | |
parent | baa1a474a387022ef5727592e0a6eb0ff6985253 (diff) | |
download | chrome-ec-78c4b5277f437435fafeebb79ca7d349a966177b.tar.gz |
power/mt8183: Obey ap-off reset flag if PMIC is already upstabilize-11217.B
On startup, we need to start from POWER_S5 if the PMIC is already
up. However, if the ap-off reset flag is set, we need to make sure
that we transition to G3 (and not to S3->S0).
BRANCH=none
BUG=b:118090373
TEST=reboot ap-off in S0/G3 works fine (AP does not boot).
TEST=AP initiated reboot works fine (AP boots up)
TEST=EC initiated reboot without ap-off works fine (AP boots up)
Change-Id: I515f8f947bfb6b1ef45f1c2ceb7b9d9e0a324c78
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1309435
Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/mt8183.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/power/mt8183.c b/power/mt8183.c index ff842ba01c..7fce482e95 100644 --- a/power/mt8183.c +++ b/power/mt8183.c @@ -168,7 +168,13 @@ enum power_state power_chipset_init(void) CPRINTS("already in S0"); return POWER_S0; } - } else if (!(system_get_reset_flags() & RESET_FLAG_AP_OFF)) { + } else if (system_get_reset_flags() & RESET_FLAG_AP_OFF) { + /* Force shutdown from S5 if the PMIC is already up. */ + if (power_get_signals() & IN_PGOOD_PMIC) { + forcing_shutdown = 1; + return POWER_S5; + } + } else { /* Auto-power on */ chipset_exit_hard_off(); } |