svn commit: r231046 - head/sys/powerpc/ofw

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun Feb 5 20:07:46 UTC 2012


Author: nwhitehorn
Date: Sun Feb  5 20:07:45 2012
New Revision: 231046
URL: http://svn.freebsd.org/changeset/base/231046

Log:
  Inherit from PCI bridge driver instead of manually specifying all of its
  methods.
  
  Obtained from:	sparc64
  MFC after:	1 week

Modified:
  head/sys/powerpc/ofw/ofw_pcib_pci.c

Modified: head/sys/powerpc/ofw/ofw_pcib_pci.c
==============================================================================
--- head/sys/powerpc/ofw/ofw_pcib_pci.c	Sun Feb  5 20:06:43 2012	(r231045)
+++ head/sys/powerpc/ofw/ofw_pcib_pci.c	Sun Feb  5 20:07:45 2012	(r231046)
@@ -56,31 +56,10 @@ static int	ofw_pcib_pci_route_interrupt(
 static device_method_t ofw_pcib_pci_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		ofw_pcib_pci_probe),
-	DEVMETHOD(device_attach,		ofw_pcib_pci_attach),
-	DEVMETHOD(device_shutdown,		bus_generic_shutdown),
-	DEVMETHOD(device_suspend,		bus_generic_suspend),
-	DEVMETHOD(device_resume,		bus_generic_resume),
-
-	/* Bus interface */
-	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),
+	DEVMETHOD(device_attach,	ofw_pcib_pci_attach),
 
 	/* 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,	ofw_pcib_pci_route_interrupt),
-	DEVMETHOD(pcib_alloc_msi,	pcib_alloc_msi),
-	DEVMETHOD(pcib_release_msi,	pcib_release_msi),
-	DEVMETHOD(pcib_alloc_msix,	pcib_alloc_msix),
-	DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-	DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
 	/* ofw_bus interface */
 	DEVMETHOD(ofw_bus_get_node,	ofw_pcib_pci_get_node),
@@ -101,8 +80,8 @@ struct ofw_pcib_softc {
         struct ofw_bus_iinfo    ops_iinfo;
 };
 
-DEFINE_CLASS_0(pcib, ofw_pcib_pci_driver, ofw_pcib_pci_methods,
-    sizeof(struct ofw_pcib_softc));
+DEFINE_CLASS_1(pcib, ofw_pcib_pci_driver, ofw_pcib_pci_methods,
+    sizeof(struct ofw_pcib_softc), pcib_driver);
 DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_pci_driver, pcib_devclass, 0, 0);
 
 static int


More information about the svn-src-head mailing list