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>
This commit is contained in:
Duncan Laurie 2015-01-15 13:24:38 -08:00 committed by Stefan Reinauer
parent a5c417ecd8
commit f9a6a82ea6
1 changed files with 9 additions and 0 deletions

View File

@ -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);