Skip to content

Commit 0d74aa0

Browse files
committed
[ot] hw/opentitan: ot_spi_device: rename packet handling trace message
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent 70071a5 commit 0d74aa0

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
@@ -2196,13 +2196,13 @@ static void ot_spi_device_chr_handle_header(OtSPIDeviceState *s)
21962196
uint8_t comm = mode ^ (uint8_t)s->spi_regs[R_CFG];
21972197
bus->mode = (comm & (R_CFG_CPOL_MASK | R_CFG_CPHA_MASK)) ? 0xFF : 0x00;
21982198

2199-
trace_ot_spi_device_chr_cs_assert(bus->byte_count, bus->release,
2200-
bus->rev_rx ? 'l' : 'm',
2201-
bus->rev_tx ? 'l' : 'm',
2202-
bus->mode ? "mismatch" : "ok");
2199+
trace_ot_spi_device_chr_handle_packet(bus->byte_count, bus->release,
2200+
bus->rev_rx ? 'l' : 'm',
2201+
bus->rev_tx ? 'l' : 'm',
2202+
bus->mode ? "mismatch" : "ok");
22032203

22042204
if (!bus->byte_count) {
2205-
/* no payload, stay in IDLE */
2205+
/* no payload, stay in IDLE (handle_header is only called from IDLE) */
22062206
return;
22072207
}
22082208

@@ -2449,6 +2449,7 @@ static void ot_spi_device_chr_receive(void *opaque, const uint8_t *buf,
24492449
fifo8_push(&bus->chr_fifo, *buf++);
24502450
}
24512451
if (fifo8_is_full(&bus->chr_fifo)) {
2452+
/* a full header has been received, it can be decoded */
24522453
ot_spi_device_chr_handle_header(s);
24532454
}
24542455
break;

hw/opentitan/trace-events

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ ot_socdbg_ctrl_update(const char *id, unsigned policy, bool valid) "%s: debug po
433433
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"
434434
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"
435435
ot_spi_device_bus_change_state(int line, const char *state, int stateval) "@%d: %s [%d]"
436-
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"
436+
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"
437437
ot_spi_device_chr_error(const char *err) "%s"
438438
ot_spi_device_flash_byte_unexpected(uint8_t rx) "unexpected byte 0x%02x after completed command"
439439
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)