Alexandru Gagniuc (alexandrux.gagniuc@intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14590
-gerrit
commit 82b7648010acc18331d3ff9541d7d710a7a17d40 Author: Alexandru Gagniuc alexandrux.gagniuc@intel.com Date: Tue Apr 26 15:01:01 2016 -0700
intel/amenia: Check with EC if we should enter recovery mode
Change-Id: Id35a74e3968315659b323e0ba348ad38ca11981b Signed-off-by: Alexandru Gagniuc alexandrux.gagniuc@intel.com --- src/mainboard/intel/amenia/chromeos.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/mainboard/intel/amenia/chromeos.c b/src/mainboard/intel/amenia/chromeos.c index dabb899..b6669bf 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 <ec/google/chromeec/ec.h> #include <vendorcode/google/chromeos/chromeos.h>
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; }