summaryrefslogtreecommitdiff
path: root/board/fizz
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-01-19 13:33:21 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-22 18:50:11 -0800
commitc06d7fea8f6b8235e9a7dcbb76e2a637189f9d2e (patch)
tree35a1b5a2f1d01a08bacf567d8b6506778858bcab /board/fizz
parentd9f4ce13f2a49a260db7bb6d42234439184e9e55 (diff)
downloadchrome-ec-c06d7fea8f6b8235e9a7dcbb76e2a637189f9d2e.tar.gz
host_command: Suppress individual host command debug log
Host command handler prints every single host command except when commands are repeated back-to-back. This patch allows each board decide which commands should be ignored. When debug printf is suppressed, a global counter is incremented. Developers know there were commands processed but not reported to the console. BUG=chromium:803955 BRANCH=none TEST=Observe 0x97 and 0x98 were not printed. Global suppress counter is incremented. Change-Id: I05e8cde9039f602e8fc06c20e89b328e797bd733 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/876952 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/fizz')
-rw-r--r--board/fizz/board.c6
-rw-r--r--board/fizz/board.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/board/fizz/board.c b/board/fizz/board.c
index 9756aa05c0..20aacd5650 100644
--- a/board/fizz/board.c
+++ b/board/fizz/board.c
@@ -54,6 +54,12 @@
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ## args)
+uint16_t host_command_suppressed[] = {
+ EC_CMD_CONSOLE_SNAPSHOT,
+ EC_CMD_CONSOLE_READ,
+ HOST_COMMAND_SUPPRESS_DELIMITER,
+};
+
static void tcpc_alert_event(enum gpio_signal signal)
{
if (!gpio_get_level(GPIO_USB_C0_PD_RST_ODL))
diff --git a/board/fizz/board.h b/board/fizz/board.h
index 67b7d20aad..e3c49e5f5f 100644
--- a/board/fizz/board.h
+++ b/board/fizz/board.h
@@ -29,6 +29,7 @@
#define CONFIG_DPTF
#define CONFIG_FLASH_SIZE 0x80000
#define CONFIG_FPU
+#define CONFIG_SUPPRESS_HOST_COMMANDS
#define CONFIG_I2C
#define CONFIG_I2C_MASTER
#undef CONFIG_LID_SWITCH