summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>1998-06-09 18:48:41 +0000
committerthorpej <thorpej@NetBSD.org>1998-06-09 18:48:41 +0000
commitab548fbb40ac1464c82e6e46b00ee19dd92efd02 (patch)
tree935dbea4364a7f229568fefea42425074fdc18af /sys/dev
parent387a1c5d41c31e026c148e672427b0505eae96ff (diff)
Remove the PCI-ISA bridge callback mechanism; it's no longer needed.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci.c30
-rw-r--r--sys/dev/pci/pcivar.h3
2 files changed, 8 insertions, 25 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 17013e67aa1..ad51f5a99ec 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.c,v 1.37 1998/05/31 06:05:28 cgd Exp $ */
+/* $NetBSD: pci.c,v 1.38 1998/06/09 18:48:41 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998
@@ -66,8 +66,10 @@ int pciprint __P((void *, const char *));
int pcisubmatch __P((struct device *, struct cfdata *, void *));
/*
- * Callback so that ISA/EISA bridges can attach their child busses
- * after PCI configuration is done.
+ * Important note about PCI-ISA bridges:
+ *
+ * Callbacks are used to configure these devices so that ISA/EISA bridges
+ * can attach their child busses after PCI configuration is done.
*
* This works because:
* (1) there can be at most one ISA/EISA bridge per PCI bus, and
@@ -85,9 +87,9 @@ int pcisubmatch __P((struct device *, struct cfdata *, void *));
* and the bridge is seen before the video board is, the board can show
* up as an ISA device, and that can (bogusly) complicate the PCI device's
* attach code, or make the PCI device not be properly attached at all.
+ *
+ * We use the generic config_defer() facility to achieve this.
*/
-static void (*pci_isa_bridge_callback) __P((void *));
-static void *pci_isa_bridge_callback_arg;
int
pcimatch(parent, cf, aux)
@@ -132,9 +134,6 @@ pci_probe_bus(self)
bus = sc->sc_bus;
maxndevs = sc->sc_maxndevs;
- if (bus == 0)
- pci_isa_bridge_callback = NULL;
-
for (device = 0; device < maxndevs; device++) {
pcitag_t tag;
pcireg_t id, class, intr, bhlcr, csr;
@@ -219,9 +218,6 @@ pci_probe_bus(self)
config_found_sm(self, &pa, pciprint, pcisubmatch);
}
}
-
- if (bus == 0 && pci_isa_bridge_callback != NULL)
- (*pci_isa_bridge_callback)(pci_isa_bridge_callback_arg);
}
void
@@ -332,15 +328,3 @@ pcisubmatch(parent, cf, aux)
return 0;
return ((*cf->cf_attach->ca_match)(parent, cf, aux));
}
-
-void
-set_pci_isa_bridge_callback(fn, arg)
- void (*fn) __P((void *));
- void *arg;
-{
-
- if (pci_isa_bridge_callback != NULL)
- panic("set_pci_isa_bridge_callback");
- pci_isa_bridge_callback = fn;
- pci_isa_bridge_callback_arg = arg;
-}
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index d5a84e49a6e..323b20802f2 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pcivar.h,v 1.33 1998/05/31 06:07:59 cgd Exp $ */
+/* $NetBSD: pcivar.h,v 1.34 1998/06/09 18:48:41 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -183,6 +183,5 @@ void pci_conf_print __P((pci_chipset_tag_t, pcitag_t,
void (*)(pci_chipset_tag_t, pcitag_t, const pcireg_t *)));
const struct pci_quirkdata *
pci_lookup_quirkdata __P((pci_vendor_id_t, pci_product_id_t));
-void set_pci_isa_bridge_callback __P((void (*)(void *), void *));
#endif /* _DEV_PCI_PCIVAR_H_ */