@@ -148,6 +148,7 @@ static bool pl011_loopback_enabled(PL011State *s)
static bool pl011_is_fifo_enabled(PL011State *s)
{
+ trace_pl011_fifo_is_enabled((s->lcr & LCR_FEN) != 0);
return (s->lcr & LCR_FEN) != 0;
}
@@ -464,8 +465,9 @@ static void pl011_write(void *opaque, hwaddr offset,
pl011_trace_baudrate_change(s);
break;
case 11: /* UARTLCR_H */
- /* Reset the FIFO state on FIFO enable or disable */
if ((s->lcr ^ value) & LCR_FEN) {
+ /* Reset the FIFO state on FIFO enable or disable */
+ trace_pl011_fifo_enable(value & LCR_FEN);
pl011_reset_rx_fifo(s);
pl011_reset_tx_fifo(s);
}
@@ -63,6 +63,8 @@ pl011_read(uint32_t addr, uint32_t value, const char *regname) "addr 0x%03x valu
pl011_read_fifo(int read_count) "FIFO read, read_count now %d"
pl011_write(uint32_t addr, uint32_t value, const char *regname) "addr 0x%03x value 0x%08x reg %s"
pl011_can_receive(uint32_t lcr, int read_count, int r) "LCR 0x%08x read_count %d returning %d"
+pl011_fifo_enable(bool enable) "enable:%u"
+pl011_fifo_is_enabled(bool enabled) "enabled:%u"
pl011_fifo_rx_put(uint32_t c, int read_count) "new char 0x%02x read_count now %d"
pl011_fifo_rx_full(void) "RX FIFO now full, RXFF set"
pl011_fifo_tx_put(uint8_t byte) "TX FIFO push char [0x%02x]"
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/char/pl011.c | 4 +++- hw/char/trace-events | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-)