summaryrefslogtreecommitdiff
path: root/src/mainboard/google/samus
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-01-15 13:24:38 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-10 20:16:06 +0200
commitf9a6a82ea64074ba401213256011f4875b2763de (patch)
tree8153bcbe02ac2088c09f24a081317dd24f185dde /src/mainboard/google/samus
parenta5c417ecd8174b0c8bfaa3f89acbad97efc9de34 (diff)
downloadcoreboot-f9a6a82ea64074ba401213256011f4875b2763de.tar.xz
samus: Add clear_recovery_mode_switch function
In order for recovery request to be cleared with software sync disabled we need to implement this function in the mainboard. BUG=chrome-os-partner:28234 BRANCH=samus TEST=boot in recovery with software sync disabled, ensure that the next boot will not boot in recovery again. Change-Id: Ie9c845396dfc6ab65296b2f18a86e23590c833d6 Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: 430f85608cc3b59a68a86dba64ffe428bfc216a9 Original-Change-Id: Iac15b6a1b23cc971231339439bceb013f4a031bd Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/241052 Original-Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-on: http://review.coreboot.org/9492 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/google/samus')
-rw-r--r--src/mainboard/google/samus/chromeos.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainboard/google/samus/chromeos.c b/src/mainboard/google/samus/chromeos.c
index fc7acffa14..fab06e8b9e 100644
--- a/src/mainboard/google/samus/chromeos.c
+++ b/src/mainboard/google/samus/chromeos.c
@@ -92,6 +92,15 @@ int get_recovery_mode_switch(void)
#endif
}
+int clear_recovery_mode_switch(void)
+{
+ const uint32_t kb_rec_mask =
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY);
+
+ /* Unconditionally clear the EC recovery request. */
+ return google_chromeec_clear_events_b(kb_rec_mask);
+}
+
int get_write_protect_state(void)
{
return get_gpio(CROS_WP_GPIO);