From 77e60a039f3d8328694a743e7cd15cce71b02f5d Mon Sep 17 00:00:00 2001 From: Sheng-Liang Song Date: Wed, 30 Apr 2014 15:56:13 -0700 Subject: [PATCH] rambi: Unconditionally clear the EC recovery request Implemented rambi clear_recovery_mode_switch() BUG=chromium:279607 BRANCH=TOT TEST=Verified recovery sequences on Rambi. Change-Id: I481329d0f49584ad0314bd982b80bbc86112c2c0 Signed-off-by: Sheng-Liang Song Reviewed-on: https://chromium-review.googlesource.com/197781 Reviewed-by: Aaron Durbin Reviewed-by: Randall Spangler Commit-Queue: Sheng-liang Song Tested-by: Sheng-liang Song --- src/mainboard/google/rambi/chromeos.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c index fe5b337617..8ca3c18f0e 100644 --- a/src/mainboard/google/rambi/chromeos.c +++ b/src/mainboard/google/rambi/chromeos.c @@ -73,7 +73,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "write protect", get_write_protect_state()); fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "recovery", - get_recovery_mode_switch()); + recovery_mode_enabled()); fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer", get_developer_mode_switch()); fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", get_lid_switch()); @@ -107,6 +107,18 @@ int get_recovery_mode_switch(void) #endif } +int clear_recovery_mode_switch(void) +{ +#if CONFIG_EC_GOOGLE_CHROMEEC + 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); +#else + return 0; +#endif +} + int get_write_protect_state(void) { /*