pci_cfgreg.c (60862) | pci_cfgreg.c (61994) |
---|---|
1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/i386/pci/pci_cfgreg.c 60862 2000-05-24 09:03:30Z kuriyama $ | 26 * $FreeBSD: head/sys/i386/pci/pci_cfgreg.c 61994 2000-06-23 07:44:33Z msmith $ |
27 * 28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> | 27 * 28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> |
34#include <sys/module.h> |
|
34 35#include <pci/pcivar.h> 36#include <pci/pcireg.h> 37#include <i386/isa/pcibus.h> | 35 36#include <pci/pcivar.h> 37#include <pci/pcireg.h> 38#include <i386/isa/pcibus.h> |
39#include <isa/isavar.h> |
|
38 39#include <machine/segments.h> 40#include <machine/pc/bios.h> 41 42static int cfgmech; 43static int devmax; 44static int usebios; 45 --- 604 unchanged lines hidden (view full) --- 650 651static driver_t nexus_pcib_driver = { 652 "pcib", 653 nexus_pcib_methods, 654 1, 655}; 656 657DRIVER_MODULE(pcib, nexus, nexus_pcib_driver, pcib_devclass, 0, 0); | 40 41#include <machine/segments.h> 42#include <machine/pc/bios.h> 43 44static int cfgmech; 45static int devmax; 46static int usebios; 47 --- 604 unchanged lines hidden (view full) --- 652 653static driver_t nexus_pcib_driver = { 654 "pcib", 655 nexus_pcib_methods, 656 1, 657}; 658 659DRIVER_MODULE(pcib, nexus, nexus_pcib_driver, pcib_devclass, 0, 0); |
660 661/* 662 * Install placeholder to claim the resources owned by the 663 * PCI bus interface. This could be used to extract the 664 * config space registers in the extreme case where the PnP 665 * ID is available and the PCI BIOS isn't, but for now we just 666 * eat the PnP ID and do nothing else. 667 * 668 * XXX we should silence this probe, as it will generally confuse 669 * people. 670 */ 671static struct isa_pnp_id pcibus_pnp_ids[] = { 672 { 0x030ad041 /* PNP030A */, "PCI Bus" }, 673 { 0 } 674}; 675 676static int 677pcibus_pnp_probe(device_t dev) 678{ 679 int result; 680 681 if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, pcibus_pnp_ids)) <= 0) 682 device_quiet(dev); 683 return(result); 684} 685 686static int 687pcibus_pnp_attach(device_t dev) 688{ 689 return(0); 690} 691 692static device_method_t pcibus_pnp_methods[] = { 693 /* Device interface */ 694 DEVMETHOD(device_probe, pcibus_pnp_probe), 695 DEVMETHOD(device_attach, pcibus_pnp_attach), 696 DEVMETHOD(device_detach, bus_generic_detach), 697 DEVMETHOD(device_shutdown, bus_generic_shutdown), 698 DEVMETHOD(device_suspend, bus_generic_suspend), 699 DEVMETHOD(device_resume, bus_generic_resume), 700 { 0, 0 } 701}; 702 703static driver_t pcibus_pnp_driver = { 704 "pcibus_pnp", 705 pcibus_pnp_methods, 706 1, /* no softc */ 707}; 708 709static devclass_t pcibus_pnp_devclass; 710 711DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0); |
|