summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-08-28 14:06:33 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-29 03:00:07 +0000
commit1b358e2c934c119f96bd435a3f4f12a272142400 (patch)
treecbf8530c9138203e9d50bb260888fdf077d5d724 /common
parent2f4de76850dc6323febbbcf0b207a3fa2c8b211a (diff)
downloadchrome-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 'common')
-rw-r--r--common/system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/system.c b/common/system.c
index 0782d79289..ee6d7ce97e 100644
--- a/common/system.c
+++ b/common/system.c
@@ -624,11 +624,13 @@ static int handle_pending_reboot(enum ec_reboot_cmd cmd)
case EC_REBOOT_DISABLE_JUMP:
system_disable_jump();
return EC_SUCCESS;
+#ifdef CONFIG_HIBERNATE
case EC_REBOOT_HIBERNATE:
CPRINTS("system hibernating");
system_hibernate(0, 0);
/* That shouldn't return... */
return EC_ERROR_UNKNOWN;
+#endif
default:
return EC_ERROR_INVAL;
}
@@ -697,6 +699,7 @@ DECLARE_CONSOLE_COMMAND(scratchpad, command_scratchpad,
NULL);
#endif /* CONFIG_CMD_SCRATCHPAD */
+#ifdef CONFIG_HIBERNATE
static int command_hibernate(int argc, char **argv)
{
int seconds = 0;
@@ -720,6 +723,7 @@ DECLARE_CONSOLE_COMMAND(hibernate, command_hibernate,
"[sec] [usec]",
"Hibernate the EC",
NULL);
+#endif /* CONFIG_HIBERNATE */
static int command_version(int argc, char **argv)
{