Date: Sat, 29 Jan 2011 20:28:17 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218074 - head/sys/powerpc/mpc85xx Message-ID: <201101292028.p0TKSHXB044302@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat Jan 29 20:28:17 2011 New Revision: 218074 URL: http://svn.freebsd.org/changeset/base/218074 Log: Have nexus behave the same as the one on ARM (marvell SoCs), so as to prevent warnings during boot WRT to the fdtbus attachment. Modified: head/sys/powerpc/mpc85xx/nexus.c Modified: head/sys/powerpc/mpc85xx/nexus.c ============================================================================== --- head/sys/powerpc/mpc85xx/nexus.c Sat Jan 29 20:25:20 2011 (r218073) +++ head/sys/powerpc/mpc85xx/nexus.c Sat Jan 29 20:28:17 2011 (r218074) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); * Device interface */ static int nexus_probe(device_t); +static int nexus_attach(device_t); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -77,14 +78,14 @@ static int nexus_deactivate_resource(dev static device_method_t nexus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, nexus_probe), - DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_attach, nexus_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface. Resource management is business of the children... */ - DEVMETHOD(bus_add_child, NULL), + DEVMETHOD(bus_add_child, bus_generic_add_child), DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_probe_nomatch, NULL), DEVMETHOD(bus_read_ivar, NULL), @@ -109,17 +110,25 @@ static devclass_t nexus_devclass; DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); static int -nexus_probe (device_t dev) +nexus_probe(device_t dev) { - device_add_child(dev, "fdtbus", 0); - device_quiet(dev); - + if (!bootverbose) + device_quiet(dev); return (BUS_PROBE_DEFAULT); } static int -nexus_activate_resource (device_t bus, device_t child, int type, int rid, +nexus_attach(device_t dev) +{ + + bus_generic_probe(dev); + bus_generic_attach(dev); + return (0); +} + +static int +nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { @@ -128,7 +137,7 @@ nexus_activate_resource (device_t bus, d } static int -nexus_deactivate_resource (device_t bus, device_t child, int type, int rid, +nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101292028.p0TKSHXB044302>