summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-10-22 16:56:10 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-29 04:15:05 -0700
commit51a6070f845ed670c5a198a7045af3d3bb3bbdd4 (patch)
treea247c66e5299aae1d9a657fdd695c3759063ec40 /include/system.h
parent149190dd3a823d835be71ec4b4e4ae9e5120c774 (diff)
downloadchrome-ec-51a6070f845ed670c5a198a7045af3d3bb3bbdd4.tar.gz
system: Remember if reset was due to AP watchdog triggering
On MT8183, when EC detects a watchdog reset, EC needs to reboot itself in preparation for the next boot. This means that AP loses the reset cause (as AP system reset is toggled), and, therefore, we need to save the reset reason in the EC. BRANCH=none BUG=b:109900671 TEST=apshutdown, powerb, see that reset reason is: reset-pin TEST=Use test-wd from bug. Reset reason: reset-pin ap-watchdog Change-Id: I2e30306db5727a22de930f00dc30de40b9695bef Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1295890 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index c040bca840..ca7b24c624 100644
--- a/include/system.h
+++ b/include/system.h
@@ -33,6 +33,7 @@
#define RESET_FLAG_RDD (1 << 15) /* USB Type-C debug cable */
#define RESET_FLAG_RBOX (1 << 16) /* Fixed Reset Functionality */
#define RESET_FLAG_SECURITY (1 << 17) /* Security threat */
+#define RESET_FLAG_AP_WATCHDOG (1 << 18) /* AP experienced a watchdog reset */
/* Per chip implementation to save/read raw RESET_FLAG_ flags. */
void chip_save_reset_flags(int flags);
@@ -274,6 +275,10 @@ const char *system_get_build_info(void);
* Wait for reset pin to be driven, rather that resetting ourselves.
*/
#define SYSTEM_RESET_WAIT_EXT (1 << 4)
+/*
+ * Indicate that this reset was triggered by an AP watchdog
+ */
+#define SYSTEM_RESET_AP_WATCHDOG (1 << 5)
/**
* Reset the system.