Date: Tue, 2 Mar 2004 23:48:36 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 48043 for review Message-ID: <200403030748.i237maJF081359@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48043 Change 48043 by peter@peter_daintree on 2004/03/02 23:48:10 pcibios? what's that? Affected files ... .. //depot/projects/hammer/sys/amd64/pci/pci_bus.c#14 edit .. //depot/projects/hammer/sys/amd64/pci/pci_pir.c#2 delete Differences ... ==== //depot/projects/hammer/sys/amd64/pci/pci_bus.c#14 (text+ko) ==== @@ -433,13 +433,7 @@ { int bus; - /* - * Look for a PCI BIOS interrupt routing table as that will be - * our method of routing interrupts if we have one. - */ bus = pcib_get_bus(dev); - if (pci_pir_probe(bus, 0)) - pci_pir_parse(); device_add_child(dev, "pci", bus); return bus_generic_attach(dev); } @@ -618,71 +612,3 @@ static devclass_t pcibus_pnp_devclass; DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0); - - -/* - * Provide a PCI-PCI bridge driver for PCI busses behind PCI-PCI bridges - * that appear in the PCIBIOS Interrupt Routing Table to use the routing - * table for interrupt routing when possible. - */ -static int pcibios_pcib_probe(device_t bus); - -static device_method_t pcibios_pcib_pci_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, pcibios_pcib_probe), - DEVMETHOD(device_attach, pcib_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), - - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - - /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), - DEVMETHOD(pcib_route_interrupt, pcibios_pcib_route_interrupt), - - {0, 0} -}; - -static driver_t pcibios_pcib_driver = { - "pcib", - pcibios_pcib_pci_methods, - sizeof(struct pcib_softc), -}; - -DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0); - -static int -pcibios_pcib_probe(device_t dev) -{ - int bus; - - if ((pci_get_class(dev) != PCIC_BRIDGE) || - (pci_get_subclass(dev) != PCIS_BRIDGE_PCI)) - return (ENXIO); - bus = pci_read_config(dev, PCIR_SECBUS_1, 1); - if (bus == 0) - return (ENXIO); - if (!pci_pir_probe(bus, 1)) - return (ENXIO); - device_set_desc(dev, "PCIBIOS PCI-PCI bridge"); - return (-2000); -} - -static int -pcibios_pcib_route_interrupt(device_t pcib, device_t dev, int pin) -{ - return (pci_pir_route_interrupt(pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev), pin)); -}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403030748.i237maJF081359>