summaryrefslogtreecommitdiff
path: root/zephyr/app
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-03-15 12:00:31 -0600
committerCommit Bot <commit-bot@chromium.org>2021-03-16 18:54:03 +0000
commitf466ce078261a513ffd561d6deaaa15947424e19 (patch)
treeb5bdb7c32041abca40a578aeb71d7021e23ac5a1 /zephyr/app
parentf6bc0dfffca27571f24ba97aa2f67caa7a386fc5 (diff)
downloadchrome-ec-f466ce078261a513ffd561d6deaaa15947424e19.tar.gz
zephyr: Fix recovery mode
The Zephyr initialization was missing a call to lpc_int_mask(), which caused the detected recovery event to be ignored. Add this call before keyboard_scan_init() to match Chromium EC initialization. Note - this requires CL:2731180 for recovery mode be detected correctly. BUG=b:182808955 BRANCH=none TEST=zmake testall TEST=Press recovery combo, verify depthcharge starts recovery mode. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: If03a837208d6fc025aef1359e72c09fcf39b5656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2760805 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/app')
-rw-r--r--zephyr/app/ec/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/zephyr/app/ec/main.c b/zephyr/app/ec/main.c
index e297dae2d9..58b2b2a51e 100644
--- a/zephyr/app/ec/main.c
+++ b/zephyr/app/ec/main.c
@@ -10,6 +10,7 @@
#include "ec_tasks.h"
#include "hooks.h"
#include "keyboard_scan.h"
+#include "lpc.h"
#include "system.h"
#include "vboot.h"
#include "watchdog.h"
@@ -32,6 +33,16 @@ void main(void)
init_reset_log();
}
+ /*
+ * Keyboard scan init/Button init can set recovery events to
+ * indicate to host entry into recovery mode. Before this is
+ * done, LPC_HOST_EVENT_ALWAYS_REPORT mask needs to be initialized
+ * correctly.
+ */
+ if (IS_ENABLED(CONFIG_HOSTCMD_X86)) {
+ lpc_init_mask();
+ }
+
if (IS_ENABLED(HAS_TASK_KEYSCAN)) {
keyboard_scan_init();
}