diff options
author | Wei-Ning Huang <wnhuang@google.com> | 2017-05-02 19:32:52 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-06 19:52:32 -0700 |
commit | 8c26ccbc151e8e270e04af74719d5e4befcc8ff3 (patch) | |
tree | 887ad44804131db4a7384be510462fd7b3311a0a /common/uart_buffering.c | |
parent | a5a3fa2d13b4b18f1244ae408a778c5e88130a6f (diff) | |
download | chrome-ec-8c26ccbc151e8e270e04af74719d5e4befcc8ff3.tar.gz |
uart: add config to optionally enable EC_CMD_CONSOLE_READ v1
The cros_ec_debugfs creates the `console_log` debugfs entry if EC
supports EC_CMD_CONSOLE_READ version 1. On device where i2c command
latency is critical, periodic console_read is impacting the timing of
commands.
BRANCH=none
BUG=b:37584134
TEST=on rose with CONFIG_CONSOLE_ENABLE_READ_V1 undefined, the kernel
should not create cros_tp/console_log.
Change-Id: I40d0b959ef36f2f410155fa30e01c8169032a3e9
Signed-off-by: Wei-Ning Huang <wnhuang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/494546
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'common/uart_buffering.c')
-rw-r--r-- | common/uart_buffering.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c index b81c8cf065..e8dfacd11d 100644 --- a/common/uart_buffering.c +++ b/common/uart_buffering.c @@ -405,6 +405,7 @@ static int host_command_console_read(struct host_cmd_handler_args *args) * snapshot. */ return console_read_helper(args, &tx_snapshot_tail); +#ifdef CONFIG_CONSOLE_ENABLE_READ_V1 } else if (args->version == 1) { /* Check the params to figure out where to start reading. */ p = args->params; @@ -413,9 +414,14 @@ static int host_command_console_read(struct host_cmd_handler_args *args) else if (p->subcmd == CONSOLE_READ_RECENT) return console_read_helper(args, &tx_last_snapshot_head); +#endif } return EC_RES_INVALID_PARAM; } DECLARE_HOST_COMMAND(EC_CMD_CONSOLE_READ, host_command_console_read, - EC_VER_MASK(0) | EC_VER_MASK(1)); + EC_VER_MASK(0) +#ifdef CONFIG_CONSOLE_ENABLE_READ_V1 + | EC_VER_MASK(1) +#endif + ); |