summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-05-18 15:56:30 -0700
committerRandall Spangler <rspangler@chromium.org>2012-05-21 09:17:43 -0700
commitb1bb8314bd852dea40bc7514486ce4e781e14f88 (patch)
treeb313282cf66c622fb7d008f51c9a7e27c721bb82 /include/system.h
parent8407b93f6ddbd1533adc87a650913c4581a15f41 (diff)
downloadchrome-ec-b1bb8314bd852dea40bc7514486ce4e781e14f88.tar.gz
Add LM4 support for hard reset
(And add STM32 support for disabling interrupts before reset, which got missed before.) Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:7470 TEST=from console, "reboot", then "reboot hard" Change-Id: Ib98792abc0c91a01e2230b419fc876052380655a
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h44
1 files changed, 15 insertions, 29 deletions
diff --git a/include/system.h b/include/system.h
index 4aeac7b2c6..33297dbc3f 100644
--- a/include/system.h
+++ b/include/system.h
@@ -12,29 +12,17 @@
/* Reset causes */
enum system_reset_cause_t {
- /* Unknown reset cause */
- SYSTEM_RESET_UNKNOWN = 0,
- /* System reset cause is known, but not one of the causes
- * listed below */
- SYSTEM_RESET_OTHER,
- /* Brownout */
- SYSTEM_RESET_BROWNOUT,
- /* Power-on reset */
- SYSTEM_RESET_POWER_ON,
- /* Reset caused by asserting reset (RST#) pin */
- SYSTEM_RESET_RESET_PIN,
- /* Software requested cold reset */
- SYSTEM_RESET_SOFT_COLD,
- /* Software requested warm reset */
- SYSTEM_RESET_SOFT_WARM,
- /* Watchdog timer reset */
- SYSTEM_RESET_WATCHDOG,
- /* the RTC alarm triggered power on */
- SYSTEM_RESET_RTC_ALARM,
- /* the Wake pin triggered power on */
- SYSTEM_RESET_WAKE_PIN,
- /* the low battery detection triggered power on */
- SYSTEM_RESET_LOW_BATTERY,
+ SYSTEM_RESET_UNKNOWN = 0, /* Unknown reset cause */
+ SYSTEM_RESET_OTHER, /* System reset cause is known, but not one
+ * of the causes listed below */
+ SYSTEM_RESET_BROWNOUT, /* Brownout */
+ SYSTEM_RESET_POWER_ON, /* Power-on reset */
+ SYSTEM_RESET_RESET_PIN, /* Reset pin asserted */
+ SYSTEM_RESET_SOFT, /* Soft reset trigger by core */
+ SYSTEM_RESET_WATCHDOG, /* Watchdog timer reset */
+ SYSTEM_RESET_RTC_ALARM, /* RTC alarm wake */
+ SYSTEM_RESET_WAKE_PIN, /* Wake pin triggered wake */
+ SYSTEM_RESET_LOW_BATTERY, /* Low battery triggered wake */
};
/* System images */
@@ -114,12 +102,10 @@ int system_get_board_version(void);
*/
const char *system_get_build_info(void);
-/* Resets the system. If is_cold!=0, performs a cold reset (which
- * resets on-chip peripherals); else performs a warm reset (which does
- * not reset on-chip peripherals). If successful, does not return.
- * Returns error if the reboot type cannot be requested (e.g. brownout
- * or reset pin). */
-int system_reset(int is_cold);
+/* Resets the system. If is_hard, performs a hard reset, which cuts power to
+ * the entire system; else performs a soft reset (which resets the core and
+ * on-chip peripherals, without actually cutting power to the chip). */
+void system_reset(int is_hard);
/* Sets a scratchpad register to the specified value. The scratchpad
* register must maintain its contents across a software-requested