Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/altboot Debugging output is only vi...
details: https://anonhg.NetBSD.org/src/rev/173534eb33b8
branches: trunk
changeset: 761441:173534eb33b8
user: phx <phx%NetBSD.org@localhost>
date: Thu Jan 27 17:38:04 2011 +0000
description:
Debugging output is only visible when DEBUG is defined.
diffstat:
sys/arch/sandpoint/stand/altboot/dsk.c | 20 +++++---------------
sys/arch/sandpoint/stand/altboot/fxp.c | 10 +++++++---
sys/arch/sandpoint/stand/altboot/globals.h | 8 +++++++-
sys/arch/sandpoint/stand/altboot/main.c | 14 +++++++-------
sys/arch/sandpoint/stand/altboot/nvt.c | 6 +++---
sys/arch/sandpoint/stand/altboot/pci.c | 7 +++++--
sys/arch/sandpoint/stand/altboot/rge.c | 6 +++---
sys/arch/sandpoint/stand/altboot/siisata.c | 4 ++--
sys/arch/sandpoint/stand/altboot/sip.c | 6 +++---
sys/arch/sandpoint/stand/altboot/skg.c | 6 +++---
sys/arch/sandpoint/stand/altboot/sme.c | 9 ++++-----
sys/arch/sandpoint/stand/altboot/vge.c | 6 +++---
sys/arch/sandpoint/stand/altboot/wm.c | 6 +++---
13 files changed, 55 insertions(+), 53 deletions(-)
diffs (truncated from 361 to 300 lines):
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/dsk.c
--- a/sys/arch/sandpoint/stand/altboot/dsk.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/dsk.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.2 2011/01/23 01:32:08 nisimura Exp $ */
+/* $NetBSD: dsk.c,v 1.3 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -239,12 +239,10 @@
uint64_t huge;
p = (uint16_t *)ident;
-#if 1
- printf("[49]%04x [82]%04x [83]%04x [84]%04x "
- "[85]%04x [86]%04x [87]%04x [88]%04x\n",
- p[49], p[82], p[83], p[84],
- p[85], p[86], p[87], p[88]);
-#endif
+ DPRINTF(("[49]%04x [82]%04x [83]%04x [84]%04x "
+ "[85]%04x [86]%04x [87]%04x [88]%04x\n",
+ p[49], p[82], p[83], p[84],
+ p[85], p[86], p[87], p[88]));
huge = 0;
printf("%s: ", d->xname);
printf("<%s> ", mkident((char *)ident + 54, 40));
@@ -332,7 +330,6 @@
found:
d->dlabel = allocaligned(sizeof(struct disklabel), 4);
memcpy(d->dlabel, dlp, sizeof(struct disklabel));
-#if 1
for (i = 0; i < dlp->d_npartitions; i += 1) {
const char *type;
pp = &dlp->d_partitions[i];
@@ -351,7 +348,6 @@
if (type != NULL)
printf("%s%c: %s\n", d->xname, i + 'a', type);
}
-#endif
}
static void
@@ -480,9 +476,6 @@
}
return ENXIO;
found:
-#if 0
-printf("dsk_open found %s\n", fsmod);
-#endif
d->fsops = fs;
f->f_devdata = d;
@@ -512,9 +505,6 @@
struct disklabel *dlp;
int64_t bno;
-#if 0
-printf("%s %lld %d\n", d->xname, dblk, size);
-#endif
if (size == 0)
return 0;
if (rw != F_READ)
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/fxp.c
--- a/sys/arch/sandpoint/stand/altboot/fxp.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/fxp.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fxp.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: fxp.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*
* most of the following code was imported from dev/ic/i82557.c; the
@@ -132,7 +132,9 @@
static void autosize_eeprom(struct local *);
static int read_eeprom(struct local *, int);
static void fxp_scb_wait(struct local *);
+#ifdef DEBUG
static int fxp_mdi_read(struct local *, int, int);
+#endif
/*
* Template for default configuration parameters.
@@ -208,8 +210,8 @@
printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x, ",
en[0], en[1], en[2], en[3], en[4], en[5]);
- printf("PHY %d (%04x.%04x)\n", fxp_mdi_read(sc, 1, 18),
- fxp_mdi_read(sc, 1, 2), fxp_mdi_read(sc, 1, 3));
+ DPRINTF(("PHY %d (%04x.%04x)\n", fxp_mdi_read(sc, 1, 18),
+ fxp_mdi_read(sc, 1, 2), fxp_mdi_read(sc, 1, 3)));
/*
* Initialize base of CBL and RFA memory. Loading with zero
@@ -505,6 +507,7 @@
printf("SCB timeout\n");
}
+#ifdef DEBUG
static int
fxp_mdi_read(struct local *sc, int phy, int reg)
{
@@ -523,3 +526,4 @@
return (value & 0xffff);
}
+#endif
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/globals.h
--- a/sys/arch/sandpoint/stand/altboot/globals.h Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/globals.h Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,10 @@
-/* $NetBSD: globals.h,v 1.2 2011/01/23 01:32:08 nisimura Exp $ */
+/* $NetBSD: globals.h,v 1.3 2011/01/27 17:38:04 phx Exp $ */
+
+#ifdef DEBUG
+#define DPRINTF(x) printf x
+#else
+#define DPRINTF(x)
+#endif
/* clock feed */
#ifndef EXT_CLK_FREQ
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/main.c
--- a/sys/arch/sandpoint/stand/altboot/main.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/main.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.4 2011/01/26 13:36:49 nisimura Exp $ */
+/* $NetBSD: main.c,v 1.5 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -121,27 +121,27 @@
sizeof(lata)/sizeof(lata[0]));
if (n == 0) {
dsk = ~0;
- printf("no IDE found\n");
+ DPRINTF(("No IDE found!\n"));
}
else {
dsk = lata[0][1];
pcidecomposetag(dsk, &b, &d, &f);
- printf("%04x.%04x IDE %02d:%02d:%02d\n",
+ DPRINTF(("%04x.%04x IDE %02d:%02d:%02d\n",
PCI_VENDOR(lata[0][0]), PCI_PRODUCT(lata[0][0]),
- b, d, f);
+ b, d, f));
}
n = pcilookup(PCI_CLASS_ETH, lnif, sizeof(lnif)/sizeof(lnif[0]));
if (n == 0) {
tag = ~0;
- printf("no NIC found\n");
+ DPRINTF(("no NIC found\n"));
}
else {
tag = lnif[0][1];
pcidecomposetag(tag, &b, &d, &f);
- printf("%04x.%04x NIC %02d:%02d:%02d\n",
+ DPRINTF(("%04x.%04x NIC %02d:%02d:%02d\n",
PCI_VENDOR(lnif[0][0]), PCI_PRODUCT(lnif[0][0]),
- b, d, f);
+ b, d, f));
}
pcisetup();
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/nvt.c
--- a/sys/arch/sandpoint/stand/altboot/nvt.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/nvt.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvt.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: nvt.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -197,8 +197,8 @@
printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
en[0], en[1], en[2], en[3], en[4], en[5]);
- printf("PHY %d (%04x.%04x)\n", l->phy,
- mii_read(l, l->phy, 2), mii_read(l, l->phy, 3));
+ DPRINTF(("PHY %d (%04x.%04x)\n", l->phy,
+ mii_read(l, l->phy, 2), mii_read(l, l->phy, 3)));
mii_dealan(l, 5);
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/pci.c
--- a/sys/arch/sandpoint/stand/altboot/pci.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/pci.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: pci.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -187,6 +187,7 @@
unsigned val;
/* 0x00 */
+#ifdef DEBUG
printf("%02d:%02d:%02d:", bus, dev, func);
val = cfgread(bus, dev, func, 0x00);
printf(" chip %04x.%04x", val & 0xffff, val>>16);
@@ -197,6 +198,7 @@
val & 0xff, (val>>24), (val>>16) & 0xff, (val>>8) & 0xff);
val = cfgread(bus, dev, func, 0x0c);
printf(" hdr %02x\n", (val>>16) & 0xff);
+#endif
/* 0x04 */
val = cfgread(bus, dev, func, 0x04);
@@ -308,7 +310,8 @@
cfgwrite(bus, dev, func, mapr, 0);
}
}
-printf("%s base %x size %x\n", (val & 01) ? "i/o" : "mem", mapbase, size);
+ DPRINTF(("%s base %x size %x\n", (val & 01) ? "i/o" : "mem",
+ mapbase, size));
}
}
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/rge.c
--- a/sys/arch/sandpoint/stand/altboot/rge.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/rge.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rge.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: rge.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -168,8 +168,8 @@
printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
en[0], en[1], en[2], en[3], en[4], en[5]);
- printf("PHY %d (%04x.%04x)\n", l->phy,
- mii_read(l, l->phy, 2), mii_read(l, l->phy, 3));
+ DPRINTF(("PHY %d (%04x.%04x)\n", l->phy,
+ mii_read(l, l->phy, 2), mii_read(l, l->phy, 3)));
mii_dealan(l, 5);
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/siisata.c
--- a/sys/arch/sandpoint/stand/altboot/siisata.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/siisata.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: siisata.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
if (satapresense(l, n)) {
/* drive present, now check whether soft reset works */
if (perform_atareset(l, n)) {
- printf("port %d device present\n", n);
+ DPRINTF(("port %d device present\n", n));
l->presense[n] = 1;
}
} else
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/sip.c
--- a/sys/arch/sandpoint/stand/altboot/sip.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/sip.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sip.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: sip.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -178,8 +178,8 @@
printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x, ",
en[0], en[1], en[2], en[3], en[4], en[5]);
- printf("PHY %d (%04x.%04x)\n", l->phy,
- mii_read(l, l->phy, 2), mii_read(l, l->phy, 3));
+ DPRINTF(("PHY %d (%04x.%04x)\n", l->phy,
+ mii_read(l, l->phy, 2), mii_read(l, l->phy, 3)));
mii_dealan(l, 5);
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/skg.c
--- a/sys/arch/sandpoint/stand/altboot/skg.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/skg.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: skg.c,v 1.1 2011/01/23 01:05:30 nisimura Exp $ */
+/* $NetBSD: skg.c,v 1.2 2011/01/27 17:38:04 phx Exp $ */
/*-
* Copyright (c) 2010 Frank Wille.
@@ -234,8 +234,8 @@
en[i] = CSR_READ_1(l, SK_MAC0 + i);
printf("MAC address %02x:%02x:%02x:%02x:%02x:%02x\n",
en[0], en[1], en[2], en[3], en[4], en[5]);
- printf("PHY %d (%04x.%04x)\n", l->phy,
- mii_read(l, l->phy, 2), mii_read(l, l->phy, 3));
+ DPRINTF(("PHY %d (%04x.%04x)\n", l->phy,
+ mii_read(l, l->phy, 2), mii_read(l, l->phy, 3)));
/* set station address */
for (i = 0; i < 3; i++)
diff -r c76e2c10e33c -r 173534eb33b8 sys/arch/sandpoint/stand/altboot/sme.c
--- a/sys/arch/sandpoint/stand/altboot/sme.c Thu Jan 27 17:36:27 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/sme.c Thu Jan 27 17:38:04 2011 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index