Skip to content

Commit 4eb8b51

Browse files
committed
[ot] hw/opentitan: ot_spi_device: rename packet handling trace message
Signed-off-by: Emmanuel Blot <[email protected]> (cherry picked from commit 9c25aba)
1 parent 074b601 commit 4eb8b51

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

hw/opentitan/ot_spi_device.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,13 +1870,13 @@ static void ot_spi_device_chr_handle_header(OtSPIDeviceState *s)
18701870
uint8_t comm = mode ^ (uint8_t)s->spi_regs[R_CFG];
18711871
bus->mode = (comm != 0) ? 0xFF : 0x00;
18721872

1873-
trace_ot_spi_device_chr_cs_assert(bus->byte_count, bus->release,
1874-
bus->rev_rx ? 'l' : 'm',
1875-
bus->rev_tx ? 'l' : 'm',
1876-
bus->mode ? "mismatch" : "ok");
1873+
trace_ot_spi_device_chr_handle_packet(bus->byte_count, bus->release,
1874+
bus->rev_rx ? 'l' : 'm',
1875+
bus->rev_tx ? 'l' : 'm',
1876+
bus->mode ? "mismatch" : "ok");
18771877

18781878
if (!bus->byte_count) {
1879-
/* no payload, stay in IDLE */
1879+
/* no payload, stay in IDLE (handle_header is only called from IDLE) */
18801880
return;
18811881
}
18821882

@@ -1973,6 +1973,7 @@ static void ot_spi_device_chr_receive(void *opaque, const uint8_t *buf,
19731973
fifo8_push(&bus->chr_fifo, *buf++);
19741974
}
19751975
if (fifo8_is_full(&bus->chr_fifo)) {
1976+
/* a full header has been received, it can be decoded */
19761977
ot_spi_device_chr_handle_header(s);
19771978
}
19781979
break;

hw/opentitan/trace-events

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ ot_socdbg_ctrl_update(const char *id, unsigned policy, bool valid) "%s: debug po
432432
ot_spi_device_buf_read_out(uint32_t addr, unsigned size, uint32_t val, uint32_t pc) "addr=0x%03x, sz=%u, val=0x%08x, pc=0x%x"
433433
ot_spi_device_buf_write_in(uint32_t addr, unsigned size, uint32_t val, uint32_t pc) "addr=0x%03x, sz=%u, val=0x%08x, pc=0x%x"
434434
ot_spi_device_bus_change_state(int line, const char *state, int stateval) "@%d: %s [%d]"
435-
ot_spi_device_chr_cs_assert(unsigned count, bool release, char rx, char tx, const char *st) "0x%x bytes, /cs: %u, rx: %csb, tx: %csb, mode:%s"
435+
ot_spi_device_chr_handle_packet(unsigned count, unsigned eot, char rx, char tx, const char *st) "0x%x bytes, eot: %u, rx: %csb, tx: %csb, mode:%s"
436436
ot_spi_device_chr_error(const char *err) "%s"
437437
ot_spi_device_flash_byte_unexpected(uint8_t rx) "unexpected byte 0x%02x after completed command"
438438
ot_spi_device_flash_change_state(int line, const char *prev, int preval, const char *next, int nextval) "@%d: %s[%d] -> %s[%d]"

0 commit comments

Comments
 (0)