@@ -11,9 +11,8 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
-
-#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
+#include "trace.h"
#define PUV3_DMA_CH_NR (6)
#define PUV3_DMA_CH_MASK (0xff)
@@ -42,9 +41,9 @@ static uint64_t puv3_dma_read(void *opaque, hwaddr offset,
ret = s->reg_CFG[PUV3_DMA_CH(offset)];
break;
default:
- DPRINTF("Bad offset 0x%x\n", offset);
+ trace_puv3_dma_read_bad(offset);
}
- DPRINTF("offset 0x%x, value 0x%x\n", offset, ret);
+ trace_puv3_dma_read(offset, ret);
return ret;
}
@@ -61,9 +60,9 @@ static void puv3_dma_write(void *opaque, hwaddr offset,
s->reg_CFG[PUV3_DMA_CH(offset)] = value;
break;
default:
- DPRINTF("Bad offset 0x%x\n", offset);
+ trace_puv3_dma_write_bad(offset);
}
- DPRINTF("offset 0x%x, value 0x%x\n", offset, value);
+ trace_puv3_dma_write(offset, value);
}
static const MemoryRegionOps puv3_dma_ops = {
@@ -20,3 +20,9 @@ sparc32_dma_enable_lower(void) "Lower DMA enable"
# hw/dma/i8257.c
i8257_unregistered_dma(int nchan, int dma_pos, int dma_len) "unregistered DMA channel used nchan=%d dma_pos=%d dma_len=%d"
+
+# hw/dma/puv3_dma.c
+puv3_dma_read_bad(unsigned offset) "Bad offset 0x%x"
+puv3_dma_read(unsigned offset, uint32_t value) "offset 0x%x, value 0x%x"
+puv3_dma_write_bad(unsigned offset) "Bad offset 0x%x"
+puv3_dma_write(unsigned offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64
Signed-off-by: Laurent Vivier <lvivier@redhat.com> --- hw/dma/puv3_dma.c | 11 +++++------ hw/dma/trace-events | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-)