[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/49] hw/misc/imx6_src: Convert DPRINTF() to trace events
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 31/49] hw/misc/imx6_src: Convert DPRINTF() to trace events |
Date: |
Sun, 12 Jan 2025 23:17:07 +0100 |
From: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250108092538.11474-14-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/misc/imx6_src.c | 23 +++++------------------
hw/misc/trace-events | 6 ++++++
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/hw/misc/imx6_src.c b/hw/misc/imx6_src.c
index dc6a2b92ba4..06cc46292ed 100644
--- a/hw/misc/imx6_src.c
+++ b/hw/misc/imx6_src.c
@@ -17,18 +17,7 @@
#include "qemu/module.h"
#include "target/arm/arm-powerctl.h"
#include "hw/core/cpu.h"
-
-#ifndef DEBUG_IMX6_SRC
-#define DEBUG_IMX6_SRC 0
-#endif
-
-#define DPRINTF(fmt, args...) \
- do { \
- if (DEBUG_IMX6_SRC) { \
- fprintf(stderr, "[%s]%s: " fmt , TYPE_IMX6_SRC, \
- __func__, ##args); \
- } \
- } while (0)
+#include "trace.h"
static const char *imx6_src_reg_name(uint32_t reg)
{
@@ -87,7 +76,7 @@ static void imx6_src_reset(DeviceState *dev)
{
IMX6SRCState *s = IMX6_SRC(dev);
- DPRINTF("\n");
+ trace_imx6_src_reset();
memset(s->regs, 0, sizeof(s->regs));
@@ -111,7 +100,7 @@ static uint64_t imx6_src_read(void *opaque, hwaddr offset,
unsigned size)
}
- DPRINTF("reg[%s] => 0x%" PRIx32 "\n", imx6_src_reg_name(index), value);
+ trace_imx6_src_read(imx6_src_reg_name(index), value);
return value;
}
@@ -134,8 +123,7 @@ static void imx6_clear_reset_bit(CPUState *cpu,
run_on_cpu_data data)
assert(bql_locked());
s->regs[SRC_SCR] = deposit32(s->regs[SRC_SCR], ri->reset_bit, 1, 0);
- DPRINTF("reg[%s] <= 0x%" PRIx32 "\n",
- imx6_src_reg_name(SRC_SCR), s->regs[SRC_SCR]);
+ trace_imx6_clear_reset_bit(imx6_src_reg_name(SRC_SCR), s->regs[SRC_SCR]);
g_free(ri);
}
@@ -173,8 +161,7 @@ static void imx6_src_write(void *opaque, hwaddr offset,
uint64_t value,
return;
}
- DPRINTF("reg[%s] <= 0x%" PRIx32 "\n", imx6_src_reg_name(index),
- (uint32_t)current_value);
+ trace_imx6_src_write(imx6_src_reg_name(index), value);
change_mask = s->regs[index] ^ (uint32_t)current_value;
diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index 0f5d2b56660..cf1abe69285 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -253,6 +253,12 @@ ccm_clock_freq(uint32_t clock, uint32_t freq) "(Clock =
%d) = %d"
ccm_read_reg(const char *reg_name, uint32_t value) "reg[%s] <= 0x%" PRIx32
ccm_write_reg(const char *reg_name, uint32_t value) "reg[%s] => 0x%" PRIx32
+# imx6_src.c
+imx6_src_read(const char *reg_name, uint32_t value) "reg[%s] => 0x%" PRIx32
+imx6_src_write(const char *reg_name, uint64_t value) "reg[%s] <= 0x%" PRIx64
+imx6_clear_reset_bit(const char *reg_name, uint32_t value) "reg[%s] <= 0x%"
PRIx32
+imx6_src_reset(void) ""
+
# imx7_src.c
imx7_src_read(const char *reg_name, uint32_t value) "reg[%s] => 0x%" PRIx32
imx7_src_write(const char *reg_name, uint32_t value) "reg[%s] <= 0x%" PRIx32
--
2.47.1
- [PULL 20/49] hw/net/xilinx_ethlite: Map RESERVED I/O as unimplemented, (continued)
- [PULL 20/49] hw/net/xilinx_ethlite: Map RESERVED I/O as unimplemented, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 21/49] docs/nitro-enclave: Clarify Enclave and Firecracker relationship, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 26/49] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 22/49] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 23/49] hw/misc/vmcoreinfo: Convert to three-phase reset interface, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 24/49] hw/pci: Rename has_power to enabled, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 25/49] hw/ufs: Adjust value to match CPU's endian format, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 27/49] hw/sd/sdhci: Factor sdhci_sdma_transfer() out, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 28/49] hw/char/stm32f2xx_usart: replace print with trace, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 29/49] hw/timer/imx_gpt: Remove unused define, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 31/49] hw/misc/imx6_src: Convert DPRINTF() to trace events,
Philippe Mathieu-Daudé <=
- [PULL 35/49] tests/qtest/boot-serial-test: Correct HPPA machine name, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 33/49] hw/i2c/imx_i2c: Convert DPRINTF() to trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 32/49] hw/char/imx_serial: Turn some DPRINTF() statements into trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 34/49] hw/gpio/imx_gpio: Turn DPRINTF() into trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 36/49] tests: Add functional tests for HPPA machines, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 30/49] tests/qtest/libqos: Reuse TYPE_IMX_I2C define, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 37/49] target/hppa: Convert hppa_cpu_init() to ResetHold handler, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 38/49] hw/hppa: Reset vCPUs calling resettable_reset(), Philippe Mathieu-Daudé, 2025/01/12
- [PULL 39/49] target/hppa: Only set PSW 'M' bit on reset, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 40/49] target/hppa: Set PC on vCPU reset, Philippe Mathieu-Daudé, 2025/01/12