From d79c5a4cbf3f931bd723a16d541298f803ef22a6 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 16 Aug 2018 15:58:53 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1177403 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Furquan Shaikh Reviewed-by: Nicolas Norvez --- board/meowth_fp/board.c | 9 ++++++--- 1 file 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); -- cgit v1.2.1