summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorYou-Cheng Syu <youcheng@chromium.org>2019-04-09 13:04:34 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-08-26 07:49:42 -0700
commit555a4470c7e6373cb6d5397ea5e9278317bcb008 (patch)
tree092deb6e16531e651311625d61accc51708eafb6 /include/system.h
parentb3470c02db3b03781cc4d7b0a4c7894a342cba1a (diff)
downloadchrome-ec-555a4470c7e6373cb6d5397ea5e9278317bcb008.tar.gz
include: Move RESET_FLAG_* into ec_commands.h as EC_RESET_FLAG_*
RESET_FLAGS_* are used when setting/reading the field ec_reset_flags of struct ec_response_uptime_info, which is defined in ec_commands.h. So it might be better to put those macros there. To be consistent with the other macros in the file, add "EC_" prefixes to them. BUG=b:109900671,b:118654976 BRANCH=none TEST=make buildall -j Cq-Depend: chrome-internal:1054910, chrome-internal:1054911, chrome-internal:1045539 Change-Id: If72ec25f1b34d8d46b74479fb4cd09252102aafa Signed-off-by: You-Cheng Syu <youcheng@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1520574 Tested-by: Yu-Ping Wu <yupingso@chromium.org> Commit-Ready: Yu-Ping Wu <yupingso@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/include/system.h b/include/system.h
index d09d4121b3..b215dadbf4 100644
--- a/include/system.h
+++ b/include/system.h
@@ -14,29 +14,7 @@
#include "console.h"
#include "timer.h"
-/* Reset causes */
-#define RESET_FLAG_OTHER BIT(0) /* Other known reason */
-#define RESET_FLAG_RESET_PIN BIT(1) /* Reset pin asserted */
-#define RESET_FLAG_BROWNOUT BIT(2) /* Brownout */
-#define RESET_FLAG_POWER_ON BIT(3) /* Power-on reset */
-#define RESET_FLAG_WATCHDOG BIT(4) /* Watchdog timer reset */
-#define RESET_FLAG_SOFT BIT(5) /* Soft reset trigger by core */
-#define RESET_FLAG_HIBERNATE BIT(6) /* Wake from hibernate */
-#define RESET_FLAG_RTC_ALARM BIT(7) /* RTC alarm wake */
-#define RESET_FLAG_WAKE_PIN BIT(8) /* Wake pin triggered wake */
-#define RESET_FLAG_LOW_BATTERY BIT(9) /* Low battery triggered wake */
-#define RESET_FLAG_SYSJUMP BIT(10) /* Jumped directly to this image */
-#define RESET_FLAG_HARD BIT(11) /* Hard reset from software */
-#define RESET_FLAG_AP_OFF BIT(12) /* Do not power on AP */
-#define RESET_FLAG_PRESERVED BIT(13) /* Some reset flags preserved from
- * previous boot */
-#define RESET_FLAG_USB_RESUME BIT(14) /* USB resume triggered wake */
-#define RESET_FLAG_RDD BIT(15) /* USB Type-C debug cable */
-#define RESET_FLAG_RBOX BIT(16) /* Fixed Reset Functionality */
-#define RESET_FLAG_SECURITY BIT(17) /* Security threat */
-#define RESET_FLAG_AP_WATCHDOG BIT(18) /* AP experienced a watchdog reset */
-
-/* Per chip implementation to save/read raw RESET_FLAG_ flags. */
+/* Per chip implementation to save/read raw EC_RESET_FLAG_ flags. */
void chip_save_reset_flags(uint32_t flags);
uint32_t chip_read_reset_flags(void);
@@ -81,7 +59,7 @@ void system_encode_save_flags(int reset_flags, uint32_t *save_flags);
/**
* Get the reset flags.
*
- * @return Reset flags (RESET_FLAG_*), or 0 if the cause is unknown.
+ * @return Reset flags (EC_RESET_FLAG_*), or 0 if the cause is unknown.
*/
uint32_t system_get_reset_flags(void);