diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-03-22 09:48:14 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-25 11:45:19 -0700 |
commit | c5127abeee78a4084188e6b51b7ef6129abaaad1 (patch) | |
tree | 46d7f8a3c3cda23225ea282c3b62d2af0ceda349 /chip | |
parent | 10ac310605b32bf7fbd6fc83066e72e1e70a803c (diff) | |
download | chrome-ec-c5127abeee78a4084188e6b51b7ef6129abaaad1.tar.gz |
stm32: unimplemented hibernate hard-reboots instead of hangingtoolchainAstabilize-3912.79.Brelease-R27-3912.B
This more closely emulates what LM4 does if it hibernates and then
immediately wakes. Keeps the system from becoming silently
unresponsive if a hibernate is triggered on STM32.
BUG=chrome-os-partner:18371
BRANCH=none
TEST=from ec console, 'hibernate' reboots instead of hanging
Change-Id: I031f79239725d69ba054323e4fbf8f59133f2093
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46286
Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/system.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chip/stm32/system.c b/chip/stm32/system.c index 56028ee923..4ee83ebaf4 100644 --- a/chip/stm32/system.c +++ b/chip/stm32/system.c @@ -5,6 +5,7 @@ /* System module for Chrome EC : hardware specific implementation */ +#include "console.h" #include "cpu.h" #include "registers.h" #include "system.h" @@ -104,8 +105,14 @@ static void check_reset_cause(void) void system_hibernate(uint32_t seconds, uint32_t microseconds) { - while (1) - /* NOT IMPLEMENTED */; + /* + * TODO: implement hibernate. + * + * Until then, treat this as a request to hard-reboot. + */ + cprintf(CC_SYSTEM, "[%T hibernate not supported, so rebooting]\n"); + cflush(); + system_reset(SYSTEM_RESET_HARD); } void system_pre_init(void) |