diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2004-12-07 02:11:25 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2004-12-07 02:11:25 +0000 |
commit | 80ff4f801a83d1c8d2c5db8b71400aef0018941f (patch) | |
tree | 7f32489f72974118caeaedc996774dff81529fa0 /sys/dev | |
parent | 82fd8044861dedf27c9d507c33dfaff6fccb423c (diff) |
Remove the PCI-ISA bridge callback mechanism; it's no longer needed.
From NetBSD
ok deraadt@ miod@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 30 | ||||
-rw-r--r-- | sys/dev/pci/pcivar.h | 3 |
2 files changed, 8 insertions, 25 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index b897f7b15e4..ed49597d71a 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.34 2004/06/25 08:57:10 art Exp $ */ +/* $OpenBSD: pci.c,v 1.35 2004/12/07 02:11:24 brad Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -74,8 +74,10 @@ int pciprint(void *, const char *); int pcisubmatch(struct device *, void *, 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 @@ -93,9 +95,9 @@ int pcisubmatch(struct device *, void *, 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)(void *); -static void *pci_isa_bridge_callback_arg; int pcimatch(parent, match, aux) @@ -159,9 +161,6 @@ pciattach(parent, self, aux) sc->sc_bus = bus; #endif - if (bus == 0) - pci_isa_bridge_callback = NULL; - #ifdef __PCI_BUS_DEVORDER pci_bus_devorder(pc, bus, devs); for (i = 0; (device = devs[i]) < 32 && device >= 0; i++) { @@ -279,9 +278,6 @@ pciattach(parent, self, aux) config_found_sm(self, &pa, pciprint, pcisubmatch); } } - - if (bus == 0 && pci_isa_bridge_callback != NULL) - (*pci_isa_bridge_callback)(pci_isa_bridge_callback_arg); } int @@ -343,18 +339,6 @@ pcisubmatch(parent, match, aux) return (success); } -void -set_pci_isa_bridge_callback(fn, arg) - void (*fn)(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; -} - int pci_get_capability(pc, tag, capid, offset, value) pci_chipset_tag_t pc; diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index b0a23f05e87..a0dc1209041 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.39 2004/11/30 22:30:47 mickey Exp $ */ +/* $OpenBSD: pcivar.h,v 1.40 2004/12/07 02:11:24 brad Exp $ */ /* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -208,7 +208,6 @@ int pci_matchbyid(struct pci_attach_args *, const struct pci_matchid *, int); */ const char *pci_findvendor(pcireg_t); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); -void set_pci_isa_bridge_callback(void (*)(void *), void *); const struct pci_quirkdata * pci_lookup_quirkdata(pci_vendor_id_t, pci_product_id_t); void pciagp_set_pchb(struct pci_attach_args *); |