summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2017-08-21 09:02:48 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-11-15 16:07:26 -0800
commit071142fe688c05ef1ffd54057409995f12504c1d (patch)
tree7e59643f583ac231ec1dfd7f93e6b85d8235b331 /include/system.h
parent6c92b0fcd08d00134f66d879d75a55d1cede5822 (diff)
downloadchrome-ec-071142fe688c05ef1ffd54057409995f12504c1d.tar.gz
system: Add wait-ext option to ec reboot command
EC_IN_RW signal is used to determine if the switch to dev mode can be safely made. However, EC_IN_RW needs the EC_RST_L line driven low in order to be reset. In faft tests that utilize crosEcSoftrecPower method, EC_RST_L is not being driven by servo to fix other test failures related to keeping EC and AC reboots in sync. This CL adds a new argument 'wait-ext' to the EC reboot command. When this option is used, instead of the EC generating a reset via it's system watchdog, it will wait 10 seconds for EC_RST_L to be driven. BUG=b:64603944 BRANCH=coral CQ-DEPEND=I086687c3dd7591460099267880d56ab8265d2e4b TEST=Ran "/usr/bin/test_that --board=coral <ip addr> firmware_DevMode" mutliple times and verified that it passes. Previoulsy, this test always fails when the EC is in RW before it starts. Also tested platform_ServoPowerStateController_USBPluggedin and verified it passed. Change-Id: I614f9156066d5719601ee43e29c7a064f9bba6e2 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/737524 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index 5587446ff9..f0f934ccf4 100644
--- a/include/system.h
+++ b/include/system.h
@@ -68,6 +68,14 @@ void system_pre_init(void);
void system_common_pre_init(void);
/**
+ * Set up flags that should be saved to battery backed RAM.
+ *
+ * @param reset_flags - flags passed into system_reset
+ * @param *save_flags - flags to be saved in battery backed RAM
+ */
+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.
@@ -261,6 +269,10 @@ const char *system_get_build_info(void);
* Indicate that this was a manually triggered reset.
*/
#define SYSTEM_RESET_MANUALLY_TRIGGERED (1 << 3)
+/*
+ * Wait for reset pin to be driven, rather that resetting ourselves.
+ */
+#define SYSTEM_RESET_WAIT_EXT (1 << 4)
/**
* Reset the system.