Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
trace: Use dynamic address bytes everywhere we should.
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: I0614bd39d0b47331ffb96195da3624240ef29ffa --- M trace.c 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/97/48597/1
diff --git a/trace.c b/trace.c index 22517f9..88265b5 100644 --- a/trace.c +++ b/trace.c @@ -201,6 +201,7 @@ } for (i = 0; i < count; i++) { unsigned int j = additional_pad_bytes; + unsigned int address_bytes = 0; additional_pad_bytes = 0; unsigned char cmd = data[2 + i*8];
@@ -246,7 +247,7 @@ j = 1; /* skip command byte */ } else { /* If address_mode > 1 -> always decode 4 bytes */ - int address_bytes = + address_bytes = (spi_cmd_vals->uses_address == 1) ? address_mode : 4;
if (address_mode == 3) @@ -288,7 +289,7 @@ printf("\n : "); } } - printf("%02x ", data[i * 8 + 4 + j]); + printf("%02x ", data[i * 8 + address_bytes + 1 + j]); outbytes++; if (outbytes == 16) { outbytes = 0;