summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-09-17 13:25:53 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-09-17 13:25:53 +0000
commite9297b0b2cbc82a32832f60bf1b18ec993e4e828 (patch)
tree2fa91e83767f0dfabae4bb02ce9d930cb9dc37f6 /sys/arch/sparc64/dev
parent3b7e79393d5fcbb09ba4c468ec18fcdb15ba4610 (diff)
I sense too much cut 'n paste.
Allow this to build with DEBUG.
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/psycho.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index 6a378db7f04..80af946f572 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.21 2002/07/18 05:46:29 jason Exp $ */
+/* $OpenBSD: psycho.c,v 1.22 2002/09/17 13:25:52 art Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -57,12 +57,12 @@
#include <sparc64/dev/psychovar.h>
#include <sparc64/sparc64/cache.h>
-#undef DEBUG
#ifdef DEBUG
#define PDB_PROM 0x01
#define PDB_BUSMAP 0x02
#define PDB_INTR 0x04
-int psycho_debug = 0x0;
+#define PDB_CONF 0x08
+int psycho_debug = 0;
#define DPRINTF(l, s) do { if (psycho_debug & l) printf s; } while (0)
#else
#define DPRINTF(l, s)
@@ -1191,10 +1191,10 @@ psycho_pci_conf_read(pc, tag, reg)
struct psycho_softc *sc = pp->pp_sc;
pcireg_t val = (pcireg_t)~0;
- DPRINTF(SPDB_CONF, ("pci_conf_read: tag %lx reg %x ",
+ DPRINTF(PDB_CONF, ("pci_conf_read: tag %lx reg %x ",
(long)tag, reg));
if (PCITAG_NODE(tag) != -1) {
- DPRINTF(SPDB_CONF, ("asi=%x addr=%qx (offset=%x) ...",
+ DPRINTF(PDB_CONF, ("asi=%x addr=%qx (offset=%x) ...",
bus_type_asi[sc->sc_configtag->type],
(long long)(sc->sc_configaddr +
PCITAG_OFFSET(tag) + reg),
@@ -1204,10 +1204,10 @@ psycho_pci_conf_read(pc, tag, reg)
PCITAG_OFFSET(tag) + reg);
}
#ifdef DEBUG
- else DPRINTF(SPDB_CONF, ("pci_conf_read: bogus pcitag %x\n",
+ else DPRINTF(PDB_CONF, ("pci_conf_read: bogus pcitag %x\n",
(int)PCITAG_OFFSET(tag)));
#endif
- DPRINTF(SPDB_CONF, (" returning %08x\n", (u_int)val));
+ DPRINTF(PDB_CONF, (" returning %08x\n", (u_int)val));
return (val);
}
@@ -1222,16 +1222,16 @@ psycho_pci_conf_write(pc, tag, reg, data)
struct psycho_pbm *pp = pc->cookie;
struct psycho_softc *sc = pp->pp_sc;
- DPRINTF(SPDB_CONF, ("pci_conf_write: tag %lx; reg %x; data %x; ",
+ DPRINTF(PDB_CONF, ("pci_conf_write: tag %lx; reg %x; data %x; ",
(long)PCITAG_OFFSET(tag), reg, (int)data));
- DPRINTF(SPDB_CONF, ("asi = %x; readaddr = %qx (offset = %x)\n",
+ DPRINTF(PDB_CONF, ("asi = %x; readaddr = %qx (offset = %x)\n",
bus_type_asi[sc->sc_configtag->type],
(long long)(sc->sc_configaddr + PCITAG_OFFSET(tag) + reg),
(int)PCITAG_OFFSET(tag) + reg));
/* If we don't know it, just punt. */
if (PCITAG_NODE(tag) == -1) {
- DPRINTF(SPDB_CONF, ("pci_config_write: bad addr"));
+ DPRINTF(PDB_CONF, ("pci_config_write: bad addr"));
return;
}