diff options
author | Furquan Shaikh <furquan@google.com> | 2014-07-29 18:45:48 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-25 22:31:26 +0100 |
commit | e06771c74ebf3b307b6b8690c9c68233bbee14ac (patch) | |
tree | 8a262a00fd7318500c4b5c83e2f8e520e0d4a001 /src/mainboard | |
parent | 538caba15289471467ed8e7f69d5d74c22dbd590 (diff) |
rush: Fix recovery mode switch function
BUG=chrome-os-partner:31032
BRANCH=None
TEST=Compiles successfully
Change-Id: I5c9fa9e613cc24f3f9f17330c5453cdd4306b92a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d7ba56b2459889ef24a9ce7331476c258c8b10d3
Original-Change-Id: I97da77c4f2ec3934066916c62491335a6536a85c
Original-Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/210435
Original-Tested-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: http://review.coreboot.org/8899
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/rush/chromeos.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mainboard/google/rush/chromeos.c b/src/mainboard/google/rush/chromeos.c index 91cb9d8324..03908c0434 100644 --- a/src/mainboard/google/rush/chromeos.c +++ b/src/mainboard/google/rush/chromeos.c @@ -40,7 +40,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) /* Recovery: active high */ gpios->gpios[count].port = -1; gpios->gpios[count].polarity = ACTIVE_HIGH; - gpios->gpios[count].value = 1; + gpios->gpios[count].value = get_recovery_mode_switch(); strncpy((char *)gpios->gpios[count].name, "recovery", GPIO_MAX_NAME_LENGTH); count++; @@ -81,7 +81,11 @@ int get_developer_mode_switch(void) int get_recovery_mode_switch(void) { - return 0; + uint32_t ec_events; + + ec_events = google_chromeec_get_events_b(); + return !!(ec_events & + EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY)); } int get_write_protect_state(void) |