[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] hw/timer/imx_gpt: Convert DPRINTF to trace events
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 2/3] hw/timer/imx_gpt: Convert DPRINTF to trace events |
Date: |
Mon, 13 May 2024 13:30:04 +0200 |
User-agent: |
Mozilla Thunderbird |
On 13/5/24 12:11, Bernhard Beschow wrote:
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/timer/imx_gpt.c | 18 +++++-------------
hw/timer/trace-events | 6 ++++++
2 files changed, 11 insertions(+), 13 deletions(-)
@@ -317,7 +310,7 @@ static uint64_t imx_gpt_read(void *opaque, hwaddr offset,
unsigned size)
break;
}
- DPRINTF("(%s) = 0x%08x\n", imx_gpt_reg_name(offset >> 2), reg_value);
+ trace_imx_gpt_read(imx_gpt_reg_name(offset >> 2), reg_value);
return reg_value;
}
@@ -384,8 +377,7 @@ static void imx_gpt_write(void *opaque, hwaddr offset,
uint64_t value,
IMXGPTState *s = IMX_GPT(opaque);
uint32_t oldreg;
- DPRINTF("(%s, value = 0x%08x)\n", imx_gpt_reg_name(offset >> 2),
- (uint32_t)value);
+ trace_imx_gpt_write(imx_gpt_reg_name(offset >> 2), (uint32_t)value);
@@ -49,6 +49,12 @@ cmsdk_apb_dualtimer_read(uint64_t offset, uint64_t data, unsigned
size) "CMSDK A
cmsdk_apb_dualtimer_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB dualtimer write:
offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u"
cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset"
+# imx_gpt.c
+imx_gpt_set_freq(uint32_t clksrc, uint32_t freq) "Setting clksrc %d to %d Hz"
'%d' is signed, for unsigned you want '%u'.
+imx_gpt_read(const char *name, uint32_t value) "%s -> 0x%08x"
+imx_gpt_write(const char *name, uint32_t value) "%s <- 0x%08x"
I'd avoid the cast and use uint64_t/PRIx64 here to KISS, regardless:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+imx_gpt_timeout(void) ""
+