aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2016-07-10 19:08:53 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2016-07-18 10:40:27 +1000
commitba0b17dd8f00bdc4d55d67046e4300d95ad5f3f2 (patch)
treeae4b2adf05b52d59076ebf8f4e92e92fee6b7322 /hw
parent44d691f7d9b6ebab102a31aa87fe59da8f7feff9 (diff)
dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA
Enabling DBDMA_DPRINTF unconditionally ensures that any errors in debug statements are picked up immediately. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/misc/macio/mac_dbdma.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index f116f9c36d..b6639f4f95 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -45,14 +45,13 @@
#include "sysemu/dma.h"
/* debug DBDMA */
-//#define DEBUG_DBDMA
+#define DEBUG_DBDMA 0
-#ifdef DEBUG_DBDMA
-#define DBDMA_DPRINTF(fmt, ...) \
- do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DBDMA_DPRINTF(fmt, ...)
-#endif
+#define DBDMA_DPRINTF(fmt, ...) do { \
+ if (DEBUG_DBDMA) { \
+ printf("DBDMA: " fmt , ## __VA_ARGS__); \
+ } \
+} while (0);
/*
*/
@@ -62,7 +61,7 @@ static DBDMAState *dbdma_from_ch(DBDMA_channel *ch)
return container_of(ch, DBDMAState, channels[ch->channel]);
}
-#ifdef DEBUG_DBDMA
+#if DEBUG_DBDMA
static void dump_dbdma_cmd(dbdma_cmd *cmd)
{
printf("dbdma_cmd %p\n", cmd);