diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-11-09 16:18:59 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-18 04:49:54 +0000 |
commit | f8f8830c210ed19265bccd83011c5ae1f4780c63 (patch) | |
tree | 223c96981a08b14c555e439955c4e7433742b242 | |
parent | 4e46928787f5a6c3175998409e82ca9f363d6866 (diff) | |
download | chrome-ec-f8f8830c210ed19265bccd83011c5ae1f4780c63.tar.gz |
Revert "system: Make hibernate console command invoke chipset task if chipset is on"
This reverts commit d5e08f7f0db8738b9e802b7029ece3410d22b943.
BUG=b:200823466
TEST=make buildall -j
Change-Id: I392e22d0325534a3c9ef62a15621c3d75d90b550
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273411
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r-- | common/system.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/common/system.c b/common/system.c index 6c84191c1c..cd3f59b740 100644 --- a/common/system.c +++ b/common/system.c @@ -4,7 +4,6 @@ */ /* System module for Chrome EC : common functions */ -#include "chipset.h" #include "clock.h" #include "common.h" #include "console.h" @@ -100,11 +99,6 @@ static int disable_jump; /* Disable ALL jumps if system is locked */ static int force_locked; /* Force system locked even if WP isn't enabled */ static enum ec_reboot_cmd reboot_at_shutdown; -#ifdef CONFIG_HIBERNATE -static uint32_t hibernate_seconds; -static uint32_t hibernate_microseconds; -#endif - /* On-going actions preventing going into deep-sleep mode */ uint32_t sleep_mask; @@ -894,7 +888,7 @@ static int handle_pending_reboot(enum ec_reboot_cmd cmd) /* Intentional fall-through */ case EC_REBOOT_HIBERNATE: CPRINTS("system hibernating"); - system_hibernate(hibernate_seconds, hibernate_microseconds); + system_hibernate(0, 0); /* That shouldn't return... */ return EC_ERROR_UNKNOWN; #endif @@ -984,20 +978,7 @@ static int command_hibernate(int argc, char **argv) else ccprintf("Hibernating until wake pin asserted.\n"); - /* - * If chipset is already off, then call system_hibernate directly. Else, - * let chipset_task bring down the power rails and transition to proper - * state before system_hibernate is called. - */ - if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) - system_hibernate(seconds, microseconds); - else { - reboot_at_shutdown = EC_REBOOT_HIBERNATE; - hibernate_seconds = seconds; - hibernate_microseconds = microseconds; - - chipset_force_shutdown(CHIPSET_SHUTDOWN_CONSOLE_CMD); - } + system_hibernate(seconds, microseconds); return EC_SUCCESS; } |