From ea026b2fc32bdddad6df22f7ab952761a29d9e6b Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Wed, 24 Dec 2008 09:38:16 +0000 Subject: Improve PPC device debugging git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6126 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mac_dbdma.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'hw/mac_dbdma.c') diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c index 401384c4c8..c23fbd5b9e 100644 --- a/hw/mac_dbdma.c +++ b/hw/mac_dbdma.c @@ -25,38 +25,54 @@ #include "hw.h" #include "ppc_mac.h" +/* debug DBDMA */ +//#define DEBUG_DBDMA + +#ifdef DEBUG_DBDMA +#define DBDMA_DPRINTF(fmt, args...) \ +do { printf("DBDMA: " fmt , ##args); } while (0) +#else +#define DBDMA_DPRINTF(fmt, args...) +#endif + /* DBDMA: currently no op - should suffice right now */ static void dbdma_writeb (void *opaque, target_phys_addr_t addr, uint32_t value) { - printf("%s: 0x" PADDRX " <= 0x%08x\n", __func__, addr, value); + DBDMA_DPRINTF("writeb 0x" TARGET_FMT_plx " <= 0x%08x\n", addr, value); } static void dbdma_writew (void *opaque, target_phys_addr_t addr, uint32_t value) { + DBDMA_DPRINTF("writew 0x" TARGET_FMT_plx " <= 0x%08x\n", addr, value); } static void dbdma_writel (void *opaque, target_phys_addr_t addr, uint32_t value) { + DBDMA_DPRINTF("writel 0x" TARGET_FMT_plx " <= 0x%08x\n", addr, value); } static uint32_t dbdma_readb (void *opaque, target_phys_addr_t addr) { - printf("%s: 0x" PADDRX " => 0x00000000\n", __func__, addr); + DBDMA_DPRINTF("readb 0x" TARGET_FMT_plx " => 0\n", addr); return 0; } static uint32_t dbdma_readw (void *opaque, target_phys_addr_t addr) { + DBDMA_DPRINTF("readw 0x" TARGET_FMT_plx " => 0\n", addr); + return 0; } static uint32_t dbdma_readl (void *opaque, target_phys_addr_t addr) { + DBDMA_DPRINTF("readl 0x" TARGET_FMT_plx " => 0\n", addr); + return 0; } -- cgit v1.2.3