From bdfba870636632cd66030b99f631c696b2ad1343 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Fri, 8 Jul 2016 14:11:56 +0800 Subject: [PATCH] Add CONFIG_HOSTCMD_DEBUG_MODE to set default hcdebug mode elm EC console output is very spammy, as EC_CMD_MOTION_SENSE_CMD is called every 100ms, so we want to set "hcdebug" to "off" as the default (which still includes errors, but no "normal" commands). BRANCH=none BUG=chrome-os-partner:55001 TEST=make buildall -j TEST=Flash elm EC, see that output is fairly quiet. Change-Id: I70d91c291d934b4f032e5c57f3c333e2c10b93bc Reviewed-on: https://chromium-review.googlesource.com/359112 Commit-Ready: Nicolas Boichat Tested-by: Nicolas Boichat Reviewed-by: Gwendal Grignou --- common/host_command.c | 2 +- include/config.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/host_command.c b/common/host_command.c index 91bd2ded6e..2a4c48a803 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -47,7 +47,7 @@ static enum { /* Number of host command debug modes */ HCDEBUG_MODES -} hcdebug = HCDEBUG_NORMAL; +} hcdebug = CONFIG_HOSTCMD_DEBUG_MODE; #ifdef CONFIG_CMD_HCDEBUG static const char * const hcdebug_mode_names[HCDEBUG_MODES] = { diff --git a/include/config.h b/include/config.h index 7595c796a1..bf4cf994b1 100644 --- a/include/config.h +++ b/include/config.h @@ -1052,6 +1052,9 @@ */ #undef CONFIG_HOST_COMMAND_STATUS +/* Default hcdebug mode, e.g. HCDEBUG_OFF or HCDEBUG_NORMAL */ +#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_NORMAL + /* If we have host command task, assume we also are using host events. */ #ifdef HAS_TASK_HOSTCMD #define CONFIG_HOSTCMD_EVENTS