[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/31] hw/rtc/ds1338: Trace send and receive operations
From: |
Peter Maydell |
Subject: |
[PULL 26/31] hw/rtc/ds1338: Trace send and receive operations |
Date: |
Tue, 5 Nov 2024 11:19:30 +0000 |
From: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-id: 20241103143330.123596-2-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/rtc/ds1338.c | 6 ++++++
hw/rtc/trace-events | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/hw/rtc/ds1338.c b/hw/rtc/ds1338.c
index a5fe2214184..929a92f7bda 100644
--- a/hw/rtc/ds1338.c
+++ b/hw/rtc/ds1338.c
@@ -17,6 +17,7 @@
#include "qemu/module.h"
#include "qom/object.h"
#include "sysemu/rtc.h"
+#include "trace.h"
/* Size of NVRAM including both the user-accessible area and the
* secondary register area.
@@ -126,6 +127,9 @@ static uint8_t ds1338_recv(I2CSlave *i2c)
uint8_t res;
res = s->nvram[s->ptr];
+
+ trace_ds1338_recv(s->ptr, res);
+
inc_regptr(s);
return res;
}
@@ -134,6 +138,8 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
{
DS1338State *s = DS1338(i2c);
+ trace_ds1338_send(s->ptr, data);
+
if (s->addr_byte) {
s->ptr = data & (NVRAM_SIZE - 1);
s->addr_byte = false;
diff --git a/hw/rtc/trace-events b/hw/rtc/trace-events
index ebb311a5b0e..8012afe1021 100644
--- a/hw/rtc/trace-events
+++ b/hw/rtc/trace-events
@@ -22,6 +22,10 @@ pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"
aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value
0x%08" PRIx64
aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value
0x%08" PRIx64
+# ds1338.c
+ds1338_recv(uint32_t addr, uint8_t value) "[0x%" PRIx32 "] -> 0x%02" PRIx8
+ds1338_send(uint32_t addr, uint8_t value) "[0x%" PRIx32 "] <- 0x%02" PRIx8
+
# m48t59.c
m48txx_nvram_io_read(uint64_t addr, uint64_t value) "io read addr:0x%04"
PRIx64 " value:0x%02" PRIx64
m48txx_nvram_io_write(uint64_t addr, uint64_t value) "io write addr:0x%04"
PRIx64 " value:0x%02" PRIx64
--
2.34.1
- [PULL 10/31] target/m68k: Initialize float_status fields in gdb set/get functions, (continued)
- [PULL 10/31] target/m68k: Initialize float_status fields in gdb set/get functions, Peter Maydell, 2024/11/05
- [PULL 14/31] target/xtensa: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 08/31] target/ppc: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 17/31] target/microblaze: Move setting of float rounding mode to reset, Peter Maydell, 2024/11/05
- [PULL 12/31] target/sparc: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 13/31] target/xtensa: Factor out calls to set_use_first_nan(), Peter Maydell, 2024/11/05
- [PULL 20/31] target/rx: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 16/31] target/alpha: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 19/31] target/openrisc: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05
- [PULL 21/31] softfloat: Remove fallback rule from pickNaN(), Peter Maydell, 2024/11/05
- [PULL 26/31] hw/rtc/ds1338: Trace send and receive operations,
Peter Maydell <=
- [PULL 22/31] Revert "target/arm: Fix usage of MMU indexes when EL3 is AArch32", Peter Maydell, 2024/11/05
- [PULL 28/31] hw/watchdog/wdt_imx2: Remove redundant assignment, Peter Maydell, 2024/11/05
- [PULL 25/31] disas: Fix build against Capstone v6 (again), Peter Maydell, 2024/11/05
- [PULL 23/31] target/arm: Add new MMU indexes for AArch32 Secure PL1&0, Peter Maydell, 2024/11/05
- [PULL 27/31] hw/timer/imx_gpt: Convert DPRINTF to trace events, Peter Maydell, 2024/11/05
- [PULL 29/31] hw/sensor/tmp105: Convert printf() to trace event, add tracing for read/write access, Peter Maydell, 2024/11/05
- [PULL 31/31] target/arm: Enable FEAT_CMOW for -cpu max, Peter Maydell, 2024/11/05
- [PULL 24/31] target/arm: Fix SVE SDOT/UDOT/USDOT (4-way, indexed), Peter Maydell, 2024/11/05
- [PULL 30/31] hw/net/npcm_gmac: Change error log to trace event, Peter Maydell, 2024/11/05
- [PULL 18/31] target/microblaze: Explicitly set 2-NaN propagation rule, Peter Maydell, 2024/11/05