From owner-svn-src-stable-7@FreeBSD.ORG Fri May 6 20:04:47 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A657106566B; Fri, 6 May 2011 20:04:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FED18FC0A; Fri, 6 May 2011 20:04:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K4lSx064115; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K4lgR064112; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105062004.p46K4lgR064112@svn.freebsd.org> From: Marius Strobl Date: Fri, 6 May 2011 20:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221546 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:04:47 -0000 Author: marius Date: Fri May 6 20:04:47 2011 New Revision: 221546 URL: http://svn.freebsd.org/changeset/base/221546 Log: MFC: r216962 Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic PCI-PCI bridge driver in order to safe some code. Modified: stable/7/sys/sparc64/pci/apb.c stable/7/sys/sparc64/pci/ofw_pcib.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/apb.c ============================================================================== --- stable/7/sys/sparc64/pci/apb.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221546) @@ -82,25 +82,11 @@ static device_method_t apb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apb_probe), DEVMETHOD(device_attach, apb_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, apb_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_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, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ @@ -111,7 +97,8 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); +DEFINE_CLASS_1(pcib, apb_driver, apb_methods, sizeof(struct apb_softc), + pcib_driver); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); MODULE_DEPEND(apb, pci, 1, 1, 1); Modified: stable/7/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221546) @@ -65,31 +65,11 @@ static device_method_t ofw_pcib_methods[ /* Device interface */ DEVMETHOD(device_probe, ofw_pcib_probe), DEVMETHOD(device_attach, ofw_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_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_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, ofw_pcib_gen_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), + DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -99,8 +79,8 @@ static device_method_t ofw_pcib_methods[ static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, - sizeof(struct ofw_pcib_gen_softc)); +DEFINE_CLASS_1(pcib, ofw_pcib_driver, ofw_pcib_methods, + sizeof(struct ofw_pcib_gen_softc), pcib_driver); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1);