diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index c6e8fc799ded..45bcc5e01fe0 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.85 2004/05/17 16:57:49 kochi Exp $ */ +/* $NetBSD: pci.c,v 1.86 2004/07/29 16:51:01 drochner Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.85 2004/05/17 16:57:49 kochi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.86 2004/07/29 16:51:01 drochner Exp $"); #include "opt_pci.h" @@ -67,6 +67,13 @@ CFATTACH_DECL(pci, sizeof(struct pci_softc), int pciprint __P((void *, const char *)); int pcisubmatch __P((struct device *, struct cfdata *, void *)); +#ifdef PCI_MACHDEP_ENUMERATE_BUS +#define pci_enumerate_bus PCI_MACHDEP_ENUMERATE_BUS +#else +int pci_enumerate_bus(struct pci_softc *, + int (*)(struct pci_attach_args *), struct pci_attach_args *); +#endif + /* * Important note about PCI-ISA bridges: * @@ -414,12 +421,13 @@ pci_find_device(struct pci_attach_args *pa, return (0); } +#ifndef PCI_MACHDEP_ENUMERATE_BUS /* * Generic PCI bus enumeration routine. Used unless machine-dependent * code needs to provide something else. */ int -pci_enumerate_bus_generic(struct pci_softc *sc, +pci_enumerate_bus(struct pci_softc *sc, int (*match)(struct pci_attach_args *), struct pci_attach_args *pap) { pci_chipset_tag_t pc = sc->sc_pc; @@ -477,6 +485,7 @@ pci_enumerate_bus_generic(struct pci_softc *sc, } return (0); } +#endif /* PCI_MACHDEP_ENUMERATE_BUS */ /* * Power Management Capability (Rev 2.2) diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index d5f31fb1f0e6..71db9056fc5f 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcivar.h,v 1.61 2004/05/08 23:41:40 christos Exp $ */ +/* $NetBSD: pcivar.h,v 1.62 2004/07/29 16:51:01 drochner Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -203,8 +203,6 @@ int pci_get_capability __P((pci_chipset_tag_t, pcitag_t, int, /* * Helper functions for autoconfiguration. */ -int pci_enumerate_bus_generic(struct pci_softc *, - int (*)(struct pci_attach_args *), struct pci_attach_args *); int pci_probe_device(struct pci_softc *, pcitag_t tag, int (*)(struct pci_attach_args *), struct pci_attach_args *); void pci_devinfo __P((pcireg_t, pcireg_t, int, char *, size_t));