summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pcivar.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-03-19 13:07:12 +0000
committerpeter <peter@FreeBSD.org>2000-03-19 13:07:12 +0000
commit35e00e91c81c202b223a8954e6798bff332b6ca2 (patch)
tree9a22fcf4c02473f470d31db949a7c6d32f882f33 /sys/dev/pci/pcivar.h
parentd5a5d97386bb5078082d6af0f294010609a96f04 (diff)
downloadFreeBSD-src-35e00e91c81c202b223a8954e6798bff332b6ca2.zip
FreeBSD-src-35e00e91c81c202b223a8954e6798bff332b6ca2.tar.gz
Connect the ISA and PCI compatability shims to an option. In this case
it's options COMPAT_OLDISA and COMPAT_OLDPCI. This is meant to be a fairly strong incentive to update the older drivers to newbus, but doesn't (quite) leave anybody hanging with no hardware support. I was talking with a few folks and I was encouraged to simply break or disable the shims but that was a bit too drastic for my liking.
Diffstat (limited to 'sys/dev/pci/pcivar.h')
-rw-r--r--sys/dev/pci/pcivar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 9c345c0..23cd2af 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -137,6 +137,7 @@ typedef struct {
u_int8_t seclat; /* CardBus latency timer */
} pcih2cfgregs;
+#if 0
/* PCI bus attach definitions (there could be multiple PCI bus *trees* ... */
typedef struct pciattach {
@@ -144,6 +145,7 @@ typedef struct pciattach {
int pcibushigh;
struct pciattach *next;
} pciattach;
+#endif
extern u_int32_t pci_numdevs;
@@ -277,6 +279,12 @@ PCIB_ACCESSOR(hose, HOSE, u_int32_t)
#ifdef PCI_COMPAT
+#ifdef _KERNEL
+#include "opt_compat_oldpci.h"
+#endif
+
+/* all this is going some day */
+
typedef pcicfgregs *pcici_t;
typedef unsigned pcidi_t;
typedef void pci_inthand_t(void *arg);
@@ -285,6 +293,7 @@ typedef void pci_inthand_t(void *arg);
/* just copied from old PCI code for now ... */
+#ifdef COMPAT_OLDPCI
struct pci_device {
char* pd_name;
const char* (*pd_probe ) (pcici_t tag, pcidi_t type);
@@ -292,6 +301,7 @@ struct pci_device {
u_long *pd_count;
int (*pd_shutdown) (int, int);
};
+#endif
#ifdef __i386__
typedef u_short pci_port_t;
@@ -312,6 +322,7 @@ int pci_unmap_int (pcici_t tag);
pcici_t pci_get_parent_from_tag(pcici_t tag);
int pci_get_bus_from_tag(pcici_t tag);
+#ifdef COMPAT_OLDPCI
struct module;
int compat_pci_handler (struct module *, int, void *);
#define COMPAT_PCI_DRIVER(name, pcidata) \
@@ -321,6 +332,7 @@ static moduledata_t name##_mod = { \
&pcidata \
}; \
DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY)
+#endif
#endif /* PCI_COMPAT */
OpenPOWER on IntegriCloud