diff options
author | Vic Yang <victoryang@chromium.org> | 2014-08-28 14:06:33 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-08-29 03:00:07 +0000 |
commit | 1b358e2c934c119f96bd435a3f4f12a272142400 (patch) | |
tree | cbf8530c9138203e9d50bb260888fdf077d5d724 /power | |
parent | 2f4de76850dc6323febbbcf0b207a3fa2c8b211a (diff) | |
download | chrome-ec-1b358e2c934c119f96bd435a3f4f12a272142400.tar.gz |
ryu: disable system hibernate
Hibernate is not supported on STM32F0. Disable system hibernate so that
the system doesn't auto-reboot after an hour in G3. This also benefits
us in terms of firmware size.
BUG=chrome-os-partner:31665
TEST=Boot on Ryu. Check 'hibdelay' and 'hibernate' commands are absent.
TEST=Boot Ryu from G3.
TEST=Change default hibernation delay to 1 second. Put system in G3.
Check it does not reboot.
BRANCH=None
Change-Id: Ia01d2d74bc5c22c01e29e5877bd4bd38ee7dddc8
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214834
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/power/common.c b/power/common.c index 7489f1939f..d4063d8db3 100644 --- a/power/common.c +++ b/power/common.c @@ -52,8 +52,10 @@ static enum power_state state = POWER_G3; /* Current state */ static int want_g3_exit; /* Should we exit the G3 state? */ static uint64_t last_shutdown_time; /* When did we enter G3? */ +#ifdef CONFIG_HIBERNATE /* Delay before hibernating, in seconds */ static uint32_t hibernate_delay = 3600; +#endif /** * Update input signals mask @@ -140,6 +142,7 @@ static enum power_state power_common_state(enum power_state state) } in_want = 0; +#ifdef CONFIG_HIBERNATE if (extpower_is_present()) task_wait_event(-1); else { @@ -162,6 +165,9 @@ static enum power_state power_common_state(enum power_state state) task_wait_event(wait); } } +#else /* !CONFIG_HIBERNATE */ + task_wait_event(-1); +#endif break; case POWER_S5: @@ -461,6 +467,7 @@ DECLARE_CONSOLE_COMMAND(powerindebug, command_powerindebug, "Get/set power input debug mask", NULL); +#ifdef CONFIG_HIBERNATE static int command_hibernation_delay(int argc, char **argv) { char *e; @@ -487,3 +494,4 @@ DECLARE_CONSOLE_COMMAND(hibdelay, command_hibernation_delay, "[sec]", "Set the delay before going into hibernation", NULL); +#endif /* CONFIG_HIBERNATE */ |