summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-13 14:24:33 -0700
committerRandall Spangler <rspangler@chromium.org>2012-07-16 10:17:09 -0700
commit0e933d1ce987cb68e4c5682508aba47f925613ae (patch)
treeae26d125c16a10073a4936318ffb90a7ccb582bb /common/main.c
parent1dc7241e3a32635b3e3563fd5ddae482478dd92c (diff)
downloadchrome-ec-0e933d1ce987cb68e4c5682508aba47f925613ae.tar.gz
Refactor reset reasons
Reasons are really bitflags, not a single reason. This will make it easier to implement flash protection on LM4, where hibernate is a subset of power-on reasons. Also added some additional flags we pass in a hibernate register so... 1) We don't recognize spurious RTC wake reasons 2) Hard reset via system_reset(1) is detected as a hard reset, not a RTC wake BUG=chrome-os-partner:11368 TEST=manual 1. Keyboard reset = power-on reset-pin 2. Pull battery = power-on 3. reboot = soft 4. reboot hard = power-on rtc-alarm 5. hibernate 10 then push power button = power-on wake-pin 6. reboot 3 sec later = soft 7. hibernate 1 = power-on rtc-alarm Change-Id: Icbbdbcf6dfd13c8a6a4f80a23f64cebebbfba26e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27417
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index df7a2be8aa..febebb2a0b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -84,8 +84,9 @@ int main(void)
uart_printf("[%T UART initialized after sysjump]\n");
else {
uart_puts("\n\n--- UART initialized after reboot ---\n");
- uart_printf("[Reset cause: %s]\n",
- system_get_reset_cause_string());
+ uart_puts("[Reset cause: ");
+ system_print_reset_flags();
+ uart_puts("]\n");
}
uart_printf("[Image: %s, %s]\n",
system_get_image_copy_string(),