diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-08-16 15:58:53 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-17 16:14:27 -0700 |
commit | d79c5a4cbf3f931bd723a16d541298f803ef22a6 (patch) | |
tree | ab9aa170ac83593a938971ef12ddcd7005a23449 /board/meowth_fp | |
parent | f39214def22517df6e51bed5770185f4eeef1a5f (diff) | |
download | chrome-ec-d79c5a4cbf3f931bd723a16d541298f803ef22a6.tar.gz |
nocturne_fp: Disable sleep when AP in S0
Only allow STOP mode when AP in S0ix/S3.
BRANCH=none
BUG=b:75105319
TEST=powerd_dbus_suspend => See that idlestats deep-sleep value
increases.
TEST=flashrom works.
Change-Id: I69b48adc3bd7033f88c1b606436aff0c68d5d1ac
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1177403
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'board/meowth_fp')
-rw-r--r-- | board/meowth_fp/board.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/board/meowth_fp/board.c b/board/meowth_fp/board.c index 5747505742..d02ac24fb9 100644 --- a/board/meowth_fp/board.c +++ b/board/meowth_fp/board.c @@ -23,17 +23,20 @@ void fps_event(enum gpio_signal signal) static void ap_deferred(void) { /* - * in S3, SLP_S3_L is 0 (and SLP_S0_L is X). - * in S0, SLP_S3_L is 1 and SLP_S0_L is 1. + * in S3: SLP_S3_L is 0 and SLP_S0_L is X. + * in S0ix: SLP_S3_L is X and SLP_S0_L is 0. + * in S0: SLP_S3_L is 1 and SLP_S0_L is 1. * in S5/G3, the FP MCU should not be running. */ int running = gpio_get_level(GPIO_PCH_SLP_S3_L) && gpio_get_level(GPIO_PCH_SLP_S0_L); if (running) { /* S0 */ + disable_sleep(SLEEP_MASK_AP_RUN); hook_notify(HOOK_CHIPSET_RESUME); - } else { /* S3 */ + } else { /* S0ix/S3 */ hook_notify(HOOK_CHIPSET_SUSPEND); + enable_sleep(SLEEP_MASK_AP_RUN); } } DECLARE_DEFERRED(ap_deferred); |