summaryrefslogtreecommitdiff
path: root/zephyr/app
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2021-06-12 09:01:36 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-23 16:44:26 +0000
commit509c26d3afcbbfca1f9380db299f47a5d0c5bd66 (patch)
treed32568e09836ad04511f7f986e72415f0c59736d /zephyr/app
parent354521683e2ec0b3c3b9147c904212f6132f5e9b (diff)
downloadchrome-ec-509c26d3afcbbfca1f9380db299f47a5d0c5bd66.tar.gz
zephyr: Increase priority of shell thread
Increase the priority of the shell thread so console commands like waitms and sysjump work properly. BRANCH=none BUG=b:184643483,b:189220025 TEST=Verified that "sysjump rw" works properly and firmware_ECWatchdog test passed. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I3676508d4ccc79e700833da30c27a4d7b391b240 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957584 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'zephyr/app')
-rw-r--r--zephyr/app/ec/ec_app_main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/zephyr/app/ec/ec_app_main.c b/zephyr/app/ec/ec_app_main.c
index 80f5b64bce..c35ce7f888 100644
--- a/zephyr/app/ec/ec_app_main.c
+++ b/zephyr/app/ec/ec_app_main.c
@@ -5,6 +5,7 @@
#include <kernel.h>
#include <sys/printk.h>
+#include <shell/shell_uart.h>
#include <zephyr.h>
#include "button.h"
@@ -89,6 +90,21 @@ void ec_app_main(void)
hook_notify(HOOK_INIT);
}
+
+ /*
+ * Increase priority of shell thread.
+ * This is temporary code that'll be removed
+ * after the feature outlined in bug b/191795553
+ * is implemented.
+ */
+ {
+ static const struct shell *shell;
+
+ shell = shell_backend_uart_get_ptr();
+ k_thread_priority_set(shell->ctx->tid,
+ K_HIGHEST_APPLICATION_THREAD_PRIO);
+ }
+
/*
* Print the init time. Not completely accurate because it can't take
* into account the time before timer_init(), but it'll at least catch