Deleted Added
sdiff udiff text old ( 153570 ) new ( 154079 )
full compact
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 $");
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};
546
547DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_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
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
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
638static driver_t pcibios_pcib_driver = {
639 "pcib",
640 pcibios_pcib_pci_methods,
641 sizeof(struct pcib_softc),
642};
643
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 ---