From 532f319c9d5504b6b1f6a044e138c4c62e6311b4 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Tue, 26 Apr 2016 15:01:01 -0700 Subject: intel/amenia: Check with EC if we should enter recovery mode Change-Id: Id35a74e3968315659b323e0ba348ad38ca11981b Signed-off-by: Alexandru Gagniuc Reviewed-on: https://review.coreboot.org/14590 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/intel/amenia/chromeos.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/mainboard/intel/amenia/chromeos.c b/src/mainboard/intel/amenia/chromeos.c index dabb899e36..b6669bf0e0 100644 --- a/src/mainboard/intel/amenia/chromeos.c +++ b/src/mainboard/intel/amenia/chromeos.c @@ -15,6 +15,9 @@ * GNU General Public License for more details. */ +#include "ec.h" + +#include #include int get_lid_switch(void) @@ -31,6 +34,13 @@ int get_developer_mode_switch(void) int get_recovery_mode_switch(void) { + uint32_t ec_events; + + /* Recovery mode via ESC + Refresh + PWR ? */ + ec_events = google_chromeec_get_events_b(); + if (ec_events & EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY)) + return 1; + return 0; } -- cgit v1.2.3