pci_bus.c (153570) | pci_bus.c (154079) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> | 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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/i386/pci/pci_bus.c 153570 2005-12-20 21:09:45Z jhb $"); | 28__FBSDID("$FreeBSD: head/sys/i386/pci/pci_bus.c 154079 2006-01-06 19:22:19Z jhb $"); |
29 30#include "opt_cpu.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 496 unchanged lines hidden (view full) --- 533 DEVMETHOD(pcib_maxslots, legacy_pcib_maxslots), 534 DEVMETHOD(pcib_read_config, legacy_pcib_read_config), 535 DEVMETHOD(pcib_write_config, legacy_pcib_write_config), 536 DEVMETHOD(pcib_route_interrupt, pcibios_pcib_route_interrupt), 537 538 { 0, 0 } 539}; 540 | 29 30#include "opt_cpu.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/bus.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 496 unchanged lines hidden (view full) --- 533 DEVMETHOD(pcib_maxslots, legacy_pcib_maxslots), 534 DEVMETHOD(pcib_read_config, legacy_pcib_read_config), 535 DEVMETHOD(pcib_write_config, legacy_pcib_write_config), 536 DEVMETHOD(pcib_route_interrupt, pcibios_pcib_route_interrupt), 537 538 { 0, 0 } 539}; 540 |
541static driver_t legacy_pcib_driver = { 542 "pcib", 543 legacy_pcib_methods, 544 1, 545}; | 541static devclass_t hostb_devclass; |
546 | 542 |
547DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_devclass, 0, 0); | 543DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1); 544DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0); |
548 549 550/* 551 * Install placeholder to claim the resources owned by the 552 * PCI bus interface. This could be used to extract the 553 * config space registers in the extreme case where the PnP 554 * ID is available and the PCI BIOS isn't, but for now we just 555 * eat the PnP ID and do nothing else. --- 28 unchanged lines hidden (view full) --- 584 DEVMETHOD(device_attach, pcibus_pnp_attach), 585 DEVMETHOD(device_detach, bus_generic_detach), 586 DEVMETHOD(device_shutdown, bus_generic_shutdown), 587 DEVMETHOD(device_suspend, bus_generic_suspend), 588 DEVMETHOD(device_resume, bus_generic_resume), 589 { 0, 0 } 590}; 591 | 545 546 547/* 548 * Install placeholder to claim the resources owned by the 549 * PCI bus interface. This could be used to extract the 550 * config space registers in the extreme case where the PnP 551 * ID is available and the PCI BIOS isn't, but for now we just 552 * eat the PnP ID and do nothing else. --- 28 unchanged lines hidden (view full) --- 581 DEVMETHOD(device_attach, pcibus_pnp_attach), 582 DEVMETHOD(device_detach, bus_generic_detach), 583 DEVMETHOD(device_shutdown, bus_generic_shutdown), 584 DEVMETHOD(device_suspend, bus_generic_suspend), 585 DEVMETHOD(device_resume, bus_generic_resume), 586 { 0, 0 } 587}; 588 |
592static driver_t pcibus_pnp_driver = { 593 "pcibus_pnp", 594 pcibus_pnp_methods, 595 1, /* no softc */ 596}; 597 | |
598static devclass_t pcibus_pnp_devclass; 599 | 589static devclass_t pcibus_pnp_devclass; 590 |
591DEFINE_CLASS_0(pcibus_pnp, pcibus_pnp_driver, pcibus_pnp_methods, 1); |
|
600DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0); 601 602 603/* 604 * Provide a PCI-PCI bridge driver for PCI busses behind PCI-PCI bridges 605 * that appear in the PCIBIOS Interrupt Routing Table to use the routing 606 * table for interrupt routing when possible. 607 */ --- 22 unchanged lines hidden (view full) --- 630 DEVMETHOD(pcib_maxslots, pcib_maxslots), 631 DEVMETHOD(pcib_read_config, pcib_read_config), 632 DEVMETHOD(pcib_write_config, pcib_write_config), 633 DEVMETHOD(pcib_route_interrupt, pcibios_pcib_route_interrupt), 634 635 {0, 0} 636}; 637 | 592DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0); 593 594 595/* 596 * Provide a PCI-PCI bridge driver for PCI busses behind PCI-PCI bridges 597 * that appear in the PCIBIOS Interrupt Routing Table to use the routing 598 * table for interrupt routing when possible. 599 */ --- 22 unchanged lines hidden (view full) --- 622 DEVMETHOD(pcib_maxslots, pcib_maxslots), 623 DEVMETHOD(pcib_read_config, pcib_read_config), 624 DEVMETHOD(pcib_write_config, pcib_write_config), 625 DEVMETHOD(pcib_route_interrupt, pcibios_pcib_route_interrupt), 626 627 {0, 0} 628}; 629 |
638static driver_t pcibios_pcib_driver = { 639 "pcib", 640 pcibios_pcib_pci_methods, 641 sizeof(struct pcib_softc), 642}; | 630static devclass_t pcib_devclass; |
643 | 631 |
632DEFINE_CLASS_0(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods, 633 sizeof(struct pcib_softc)); |
|
644DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0); 645 646static int 647pcibios_pcib_probe(device_t dev) 648{ 649 int bus; 650 651 if ((pci_get_class(dev) != PCIC_BRIDGE) || --- 17 unchanged lines hidden --- | 634DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0); 635 636static int 637pcibios_pcib_probe(device_t dev) 638{ 639 int bus; 640 641 if ((pci_get_class(dev) != PCIC_BRIDGE) || --- 17 unchanged lines hidden --- |