diff options
author | Keith Short <keithshort@chromium.org> | 2021-06-04 15:16:37 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-09 17:49:18 +0000 |
commit | f22f1ea5cf373357ae4f3de525cd2cb6c09ea44c (patch) | |
tree | 9a2dd48eafc6b679fd730b2687ae940dcc712036 /zephyr/shim/src/console.c | |
parent | 7837e2011cf7c4d8690a17f9b7d89768a5a01d4c (diff) | |
download | chrome-ec-f22f1ea5cf373357ae4f3de525cd2cb6c09ea44c.tar.gz |
zephyr: Add CONFIG_PLATFORM_EC_CONSOLE_CHANNEL
Add a KConfig option to enable/disable the CONFIG_CONSOLE_CHANNEL
option. Enabled by default, but can be turned off to save code space.
BUG=b:180421120
BRANCH=none
TEST=zmake testall
TEST=Boot lazor, verify 'chan' command is present or not based on this
config.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I9f5f10582ef6161a38bb2f5f7f48bae631ba9cf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2946964
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'zephyr/shim/src/console.c')
-rw-r--r-- | zephyr/shim/src/console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zephyr/shim/src/console.c b/zephyr/shim/src/console.c index 22272a9c8d..5d4e2de16f 100644 --- a/zephyr/shim/src/console.c +++ b/zephyr/shim/src/console.c @@ -175,7 +175,7 @@ int zshim_run_ec_console_command(int (*handler)(int argc, char **argv), return handler(argc, argv); } -#if DT_NODE_EXISTS(DT_PATH(ec_console)) +#if defined(CONFIG_CONSOLE_CHANNEL) && DT_NODE_EXISTS(DT_PATH(ec_console)) #define EC_CONSOLE DT_PATH(ec_console) static const char * const disabled_channels[] = DT_PROP(EC_CONSOLE, disabled); @@ -187,7 +187,7 @@ static int init_ec_console(const struct device *unused) return 0; } SYS_INIT(init_ec_console, PRE_KERNEL_1, 50); -#endif +#endif /* CONFIG_CONSOLE_CHANNEL && DT_NODE_EXISTS(DT_PATH(ec_console)) */ /* * Minimal implementation of a few uart_* functions we need. |