[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 5/6] hw/timer/puv3_ost: Convert from DPRINTF() mac
From: |
Laurent Vivier |
Subject: |
[Qemu-trivial] [PATCH 5/6] hw/timer/puv3_ost: Convert from DPRINTF() macro to trace event |
Date: |
Wed, 12 Dec 2018 18:30:06 +0100 |
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/timer/puv3_ost.c | 14 ++++++--------
hw/timer/trace-events | 7 +++++++
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c
index 0b3d717e60..387b7a9bd1 100644
--- a/hw/timer/puv3_ost.c
+++ b/hw/timer/puv3_ost.c
@@ -12,9 +12,8 @@
#include "hw/sysbus.h"
#include "hw/ptimer.h"
#include "qemu/main-loop.h"
-
-#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
+#include "trace.h"
#define TYPE_PUV3_OST "puv3_ost"
#define PUV3_OST(obj) OBJECT_CHECK(PUV3OSTState, (obj), TYPE_PUV3_OST)
@@ -51,9 +50,9 @@ static uint64_t puv3_ost_read(void *opaque, hwaddr offset,
ret = s->reg_OIER;
break;
default:
- DPRINTF("Bad offset %x\n", (int)offset);
+ trace_puv3_ost_read_bad(offset);
}
- DPRINTF("offset 0x%x, value 0x%x\n", offset, ret);
+ trace_puv3_ost_read(offset, ret);
return ret;
}
@@ -62,7 +61,7 @@ static void puv3_ost_write(void *opaque, hwaddr offset,
{
PUV3OSTState *s = opaque;
- DPRINTF("offset 0x%x, value 0x%x\n", offset, value);
+ trace_puv3_ost_write(offset, value);
switch (offset) {
case 0x00: /* Match Register 0 */
s->reg_OSMR0 = value;
@@ -85,7 +84,7 @@ static void puv3_ost_write(void *opaque, hwaddr offset,
s->reg_OIER = value;
break;
default:
- DPRINTF("Bad offset %x\n", (int)offset);
+ trace_puv3_ost_write_bad(offset);
}
}
@@ -103,8 +102,7 @@ static void puv3_ost_tick(void *opaque)
{
PUV3OSTState *s = opaque;
- DPRINTF("ost hit when ptimer counter from 0x%x to 0x%x!\n",
- s->reg_OSCR, s->reg_OSMR0);
+ trace_puv3_ost_tick(s->reg_OSCR, s->reg_OSMR0);
s->reg_OSCR = s->reg_OSMR0;
if (s->reg_OIER) {
diff --git a/hw/timer/trace-events b/hw/timer/trace-events
index 75bd3b1042..c504fd52c0 100644
--- a/hw/timer/trace-events
+++ b/hw/timer/trace-events
@@ -72,3 +72,10 @@ sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr
0x%" PRIx64 " value
# hw/timer/xlnx-zynqmp-rtc.c
xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int
sec) "Get time from host: %d-%d-%d %2d:%02d:%02d"
+
+# hw/timer/puv3_ost.c
+puv3_ost_read_bad(uint32_t offset) "Bad offset 0x%x"
+puv3_ost_read(uint32_t offset, uint32_t value) "offset 0x%x, value 0x%x"
+puv3_ost_write(uint32_t offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64
+puv3_ost_write_bad(uint32_t offset) "Bad offset 0x%x"
+puv3_ost_tick(uint32_t oscr, uint32_t osmr0) "ost hit when ptimer counter from
0x%x to 0x%x!"
--
2.19.2
- [Qemu-trivial] [PATCH 0/6] unicore32/puv3: Convert from DPRINTF() macro to trace event, Laurent Vivier, 2018/12/12
- [Qemu-trivial] [PATCH 1/6] hw/dma/puv3_dma: Convert from DPRINTF() macro to trace event, Laurent Vivier, 2018/12/12
- [Qemu-trivial] [PATCH 3/6] hw/dma/puv3_intc: Convert from DPRINTF() macro to trace event, Laurent Vivier, 2018/12/12
- [Qemu-trivial] [PATCH 5/6] hw/timer/puv3_ost: Convert from DPRINTF() macro to trace event,
Laurent Vivier <=
- [Qemu-trivial] [PATCH 6/6] unicore32/puv3: remove definition of DPRINTF, Laurent Vivier, 2018/12/12
- [Qemu-trivial] [PATCH 2/6] hw/dma/puv3_gpio: Convert from DPRINTF() macro to trace event, Laurent Vivier, 2018/12/12
- [Qemu-trivial] [PATCH 4/6] hw/misc/puv3_pm: Convert from DPRINTF() macro to trace event, Laurent Vivier, 2018/12/12