diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-08-04 18:05:50 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-05 19:40:13 +0000 |
commit | 01e36e0feefe4ac23cd828bf057a66731fd55b50 (patch) | |
tree | c705e63cc66c6ad4dc9c0786088248ec6ce1128e | |
parent | feea8de21bb7d73624eddaeb536a0bc298ccc61e (diff) | |
download | chrome-ec-01e36e0feefe4ac23cd828bf057a66731fd55b50.tar.gz |
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 <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/290545
Trybot-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | chip/lm4/lpc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |