#include "hw.h"
#include "ppc_mac.h"
-//#define DEBUG
+/* debug PIC */
+//#define DEBUG_PIC
+
+#ifdef DEBUG_PIC
+#define PIC_DPRINTF(fmt, args...) \
+do { printf("PIC: " fmt , ##args); } while (0)
+#else
+#define PIC_DPRINTF(fmt, args...)
+#endif
typedef struct HeathrowPIC {
uint32_t events;
value = bswap32(value);
#endif
n = ((addr & 0xfff) - 0x10) >> 4;
-#ifdef DEBUG
- printf("pic_writel: " PADDRX " %u: %08x\n", addr, n, value);
-#endif
+ PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
if (n >= 2)
return;
pic = &s->pics[n];
break;
}
}
-#ifdef DEBUG
- printf("pic_readl: " PADDRX " %u: %08x\n", addr, n, value);
-#endif
+ PIC_DPRINTF("readl: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
#endif
{
static int last_level[64];
if (last_level[num] != level) {
- printf("set_irq: num=0x%02x level=%d\n", num, level);
+ PIC_DPRINTF("set_irq: num=0x%02x level=%d\n", num, level);
last_level[num] = level;
}
}