From 01e36e0feefe4ac23cd828bf057a66731fd55b50 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Tue, 4 Aug 2015 18:05:50 -0700 Subject: [PATCH] lm4: Add debug output for overlapping HCs. Currently, when a host command is received which would overlap with an ongoing host command, we ignore it silently. This commit simply logs a line to the EC console stating that we are ignoring the overlapping host command. BRANCH=None BUG=chrome-os-partner:23806 TEST=make -j buildall tests TEST=Build, flash, and boot samus. Using ectool, read 64K from flash while also querying the current EC switch positions. Observe the log message being printed to the EC console. Change-Id: Ic0d249ccec2efb9600bcf8567392add1ee6295d9 Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/290545 Trybot-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Randall Spangler Commit-Queue: Aseda Aboagye --- chip/lm4/lpc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 2cca35f796..8afd61f42b 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -492,7 +492,10 @@ static void handle_acpi_write(int is_cmd) static void handle_host_write(int is_cmd) { /* Ignore data writes or overlapping commands from host */ - if (!is_cmd || (LM4_LPC_ST(LPC_CH_CMD) & LM4_LPC_ST_BUSY)) { + uint32_t is_overlapping = LM4_LPC_ST(LPC_CH_CMD) & LM4_LPC_ST_BUSY; + if (!is_cmd || is_overlapping) { + if (is_overlapping) + CPRINTS("LPC Ignoring overlapping HC"); LM4_LPC_ST(LPC_CH_CMD) &= ~LM4_LPC_ST_FRMH; return; }