Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/pci - define PCIBIOS_PRINTV() as pcibiosverbos...
details: https://anonhg.NetBSD.org/src/rev/377c5b729f1d
branches: trunk
changeset: 494949:377c5b729f1d
user: soda <soda%NetBSD.org@localhost>
date: Tue Jul 18 11:14:06 2000 +0000
description:
- define PCIBIOS_PRINTV() as pcibiosverbose printf() here,
instead of DPRINTF() in each C source.
- define PIR_DEVFUNC_{DEVICE,FUNCTION}
diffstat:
sys/arch/i386/pci/pcibios.h | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r 67d580cbc6ad -r 377c5b729f1d sys/arch/i386/pci/pcibios.h
--- a/sys/arch/i386/pci/pcibios.h Tue Jul 18 11:10:22 2000 +0000
+++ b/sys/arch/i386/pci/pcibios.h Tue Jul 18 11:14:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcibios.h,v 1.2 2000/04/28 17:15:16 uch Exp $ */
+/* $NetBSD: pcibios.h,v 1.3 2000/07/18 11:14:06 soda Exp $ */
/*
* Copyright (c) 1999, by UCHIYAMA Yasushi
@@ -79,6 +79,9 @@
u_int8_t checksum;
} __attribute__((__packed__));
+#define PIR_DEVFUNC_DEVICE(devfunc) (((devfunc) >> 3) & 0x1f)
+#define PIR_DEVFUNC_FUNCTION(devfunc) ((devfunc) & 7)
+
void pcibios_init __P((void));
extern struct pcibios_pir_header pcibios_pir_header;
@@ -88,3 +91,21 @@
void pci_device_foreach __P((pci_chipset_tag_t, int,
void (*) (pci_chipset_tag_t, pcitag_t)));
+
+#ifdef PCIBIOSVERBOSE
+extern int pcibiosverbose;
+
+#define PCIBIOS_PRINTV(arg) \
+ do { \
+ if (pcibiosverbose) \
+ printf arg; \
+ } while (0)
+#define PCIBIOS_PRINTVN(n, arg) \
+ do { \
+ if (pcibiosverbose > (n)) \
+ printf arg; \
+ } while (0)
+#else
+#define PCIBIOS_PRINTV(arg)
+#define PCIBIOS_PRINTVN(n, arg)
+#endif
Home |
Main Index |
Thread Index |
Old Index