diff options
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 206d88f195..a43fea7f58 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -13,7 +13,7 @@ #endif #ifdef __cplusplus -extern "C"{ +extern "C" { #endif /* @@ -440,7 +440,7 @@ extern "C"{ * parent structure that the alignment will still be true given the packing of * the parent structure. This is particularly important if the sub-structure * will be passed as a pointer to another function, since that function will - * not know about the misaligment caused by the parent structure's packing. + * not know about the misalignment caused by the parent structure's packing. * * Also be very careful using __packed - particularly when nesting non-packed * structures inside packed ones. In fact, DO NOT use __packed directly; @@ -5379,6 +5379,29 @@ struct ec_params_set_cbi { */ #define EC_CMD_GET_UPTIME_INFO 0x0121 +/* Reset causes */ +#define EC_RESET_FLAG_OTHER BIT(0) /* Other known reason */ +#define EC_RESET_FLAG_RESET_PIN BIT(1) /* Reset pin asserted */ +#define EC_RESET_FLAG_BROWNOUT BIT(2) /* Brownout */ +#define EC_RESET_FLAG_POWER_ON BIT(3) /* Power-on reset */ +#define EC_RESET_FLAG_WATCHDOG BIT(4) /* Watchdog timer reset */ +#define EC_RESET_FLAG_SOFT BIT(5) /* Soft reset trigger by core */ +#define EC_RESET_FLAG_HIBERNATE BIT(6) /* Wake from hibernate */ +#define EC_RESET_FLAG_RTC_ALARM BIT(7) /* RTC alarm wake */ +#define EC_RESET_FLAG_WAKE_PIN BIT(8) /* Wake pin triggered wake */ +#define EC_RESET_FLAG_LOW_BATTERY BIT(9) /* Low battery triggered wake */ +#define EC_RESET_FLAG_SYSJUMP BIT(10) /* Jumped directly to this image */ +#define EC_RESET_FLAG_HARD BIT(11) /* Hard reset from software */ +#define EC_RESET_FLAG_AP_OFF BIT(12) /* Do not power on AP */ +#define EC_RESET_FLAG_PRESERVED BIT(13) /* Some reset flags preserved from + * previous boot + */ +#define EC_RESET_FLAG_USB_RESUME BIT(14) /* USB resume triggered wake */ +#define EC_RESET_FLAG_RDD BIT(15) /* USB Type-C debug cable */ +#define EC_RESET_FLAG_RBOX BIT(16) /* Fixed Reset Functionality */ +#define EC_RESET_FLAG_SECURITY BIT(17) /* Security threat */ +#define EC_RESET_FLAG_AP_WATCHDOG BIT(18) /* AP experienced a watchdog reset */ + struct ec_response_uptime_info { /* * Number of milliseconds since the last EC boot. Sysjump resets @@ -5399,8 +5422,8 @@ struct ec_response_uptime_info { uint32_t ap_resets_since_ec_boot; /* - * The set of flags which describe the EC's most recent reset. See - * include/system.h RESET_FLAG_* for details. + * The set of flags which describe the EC's most recent reset. + * See EC_RESET_FLAG_* for details. */ uint32_t ec_reset_flags; |