diff options
author | marcel <marcel@FreeBSD.org> | 2011-01-29 20:28:17 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-01-29 20:28:17 +0000 |
commit | f9d6eb1e7555188ea1354e0096c8c5ba13fd5676 (patch) | |
tree | 3cafdfd12dc20b4561f280a51eed6191302b98bd /sys/powerpc/mpc85xx | |
parent | 97b823bf5155b2981e4e9fe4c49f8f6e3cca5c14 (diff) | |
download | FreeBSD-src-f9d6eb1e7555188ea1354e0096c8c5ba13fd5676.zip FreeBSD-src-f9d6eb1e7555188ea1354e0096c8c5ba13fd5676.tar.gz |
Have nexus behave the same as the one on ARM (marvell SoCs), so as to
prevent warnings during boot WRT to the fdtbus attachment.
Diffstat (limited to 'sys/powerpc/mpc85xx')
-rw-r--r-- | sys/powerpc/mpc85xx/nexus.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/powerpc/mpc85xx/nexus.c b/sys/powerpc/mpc85xx/nexus.c index 6b07b10..06e60ab 100644 --- a/sys/powerpc/mpc85xx/nexus.c +++ b/sys/powerpc/mpc85xx/nexus.c @@ -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(device_t, device_t, int, int, 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, device_t child, int type, int rid, } 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) { |