diff options
author | ian <ian@FreeBSD.org> | 2014-02-02 19:17:28 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-02-02 19:17:28 +0000 |
commit | 71d90c04a87e5d83dd12a18e730bf5a49659d712 (patch) | |
tree | f7a07f25a40a264286f85b60ecb1346dd35ef91b /sys/arm/ti/am335x | |
parent | 34475ded0642e033e494961693b123591dd96ff8 (diff) | |
download | FreeBSD-src-71d90c04a87e5d83dd12a18e730bf5a49659d712.zip FreeBSD-src-71d90c04a87e5d83dd12a18e730bf5a49659d712.tar.gz |
Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.
Simplebus used to only instantiate its children whose status="okay"
but that was improper behavior, fixed in r261352. Now that it doesn't
check anymore and probes all its children; the children all have to
do the check because really only the children know how to properly
interpret their status property strings.
Right now all existing drivers only understand "okay" versus something-
that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
Diffstat (limited to 'sys/arm/ti/am335x')
-rw-r--r-- | sys/arm/ti/am335x/am335x_dmtimer.c | 3 | ||||
-rw-r--r-- | sys/arm/ti/am335x/am335x_lcd.c | 3 | ||||
-rw-r--r-- | sys/arm/ti/am335x/am335x_prcm.c | 4 | ||||
-rw-r--r-- | sys/arm/ti/am335x/am335x_pwm.c | 4 | ||||
-rw-r--r-- | sys/arm/ti/am335x/am335x_usbss.c | 4 |
5 files changed, 18 insertions, 0 deletions
diff --git a/sys/arm/ti/am335x/am335x_dmtimer.c b/sys/arm/ti/am335x/am335x_dmtimer.c index 8007ca1..a01cf6a 100644 --- a/sys/arm/ti/am335x/am335x_dmtimer.c +++ b/sys/arm/ti/am335x/am335x_dmtimer.c @@ -528,6 +528,9 @@ static int am335x_dmtimer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,am335x-dmtimer")) { device_set_desc(dev, "AM335x DMTimer"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/ti/am335x/am335x_lcd.c b/sys/arm/ti/am335x/am335x_lcd.c index b236002..0f36513 100644 --- a/sys/arm/ti/am335x/am335x_lcd.c +++ b/sys/arm/ti/am335x/am335x_lcd.c @@ -404,6 +404,9 @@ am335x_lcd_probe(device_t dev) { int err; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,am335x-lcd")) return (ENXIO); diff --git a/sys/arm/ti/am335x/am335x_prcm.c b/sys/arm/ti/am335x/am335x_prcm.c index a62b2e1..a146b76 100644 --- a/sys/arm/ti/am335x/am335x_prcm.c +++ b/sys/arm/ti/am335x/am335x_prcm.c @@ -370,6 +370,10 @@ void am335x_prcm_setup_dmtimer(int); static int am335x_prcm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "am335x,prcm")) { device_set_desc(dev, "AM335x Power and Clock Management"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/ti/am335x/am335x_pwm.c b/sys/arm/ti/am335x/am335x_pwm.c index d64e08f..bf9f7c5 100644 --- a/sys/arm/ti/am335x/am335x_pwm.c +++ b/sys/arm/ti/am335x/am335x_pwm.c @@ -309,6 +309,10 @@ am335x_pwm_sysctl_period(SYSCTL_HANDLER_ARGS) static int am335x_pwm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,am335x-pwm")) return (ENXIO); diff --git a/sys/arm/ti/am335x/am335x_usbss.c b/sys/arm/ti/am335x/am335x_usbss.c index 75b92ba..f1204f3 100644 --- a/sys/arm/ti/am335x/am335x_usbss.c +++ b/sys/arm/ti/am335x/am335x_usbss.c @@ -250,6 +250,10 @@ musbotg_wrapper_interrupt(void *arg) static int musbotg_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,musb-am33xx")) return (ENXIO); |