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/allwinner | |
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/allwinner')
-rw-r--r-- | sys/arm/allwinner/a10_clk.c | 4 | ||||
-rw-r--r-- | sys/arm/allwinner/a10_ehci.c | 4 | ||||
-rw-r--r-- | sys/arm/allwinner/a10_gpio.c | 4 | ||||
-rw-r--r-- | sys/arm/allwinner/a10_wdog.c | 3 | ||||
-rw-r--r-- | sys/arm/allwinner/a20/a20_cpu_cfg.c | 3 | ||||
-rw-r--r-- | sys/arm/allwinner/aintc.c | 4 |
6 files changed, 22 insertions, 0 deletions
diff --git a/sys/arm/allwinner/a10_clk.c b/sys/arm/allwinner/a10_clk.c index 8518c74..aca137d 100644 --- a/sys/arm/allwinner/a10_clk.c +++ b/sys/arm/allwinner/a10_clk.c @@ -69,6 +69,10 @@ static struct a10_ccm_softc *a10_ccm_sc = NULL; static int a10_ccm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-ccm")) { device_set_desc(dev, "Allwinner Clock Control Module"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/allwinner/a10_ehci.c b/sys/arm/allwinner/a10_ehci.c index 4145a5c..657a5f5 100644 --- a/sys/arm/allwinner/a10_ehci.c +++ b/sys/arm/allwinner/a10_ehci.c @@ -93,6 +93,10 @@ bs_w_1_proto(reversed); static int a10_ehci_probe(device_t self) { + + if (!ofw_bus_status_okay(self)) + return (ENXIO); + if (!ofw_bus_is_compatible(self, "allwinner,usb-ehci")) return (ENXIO); diff --git a/sys/arm/allwinner/a10_gpio.c b/sys/arm/allwinner/a10_gpio.c index c14f228..1ecb27b 100644 --- a/sys/arm/allwinner/a10_gpio.c +++ b/sys/arm/allwinner/a10_gpio.c @@ -410,6 +410,10 @@ a10_gpio_pin_toggle(device_t dev, uint32_t pin) static int a10_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-gpio")) return (ENXIO); diff --git a/sys/arm/allwinner/a10_wdog.c b/sys/arm/allwinner/a10_wdog.c index f951936..af7365b 100644 --- a/sys/arm/allwinner/a10_wdog.c +++ b/sys/arm/allwinner/a10_wdog.c @@ -93,6 +93,9 @@ static int a10wd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-wdt")) { device_set_desc(dev, "Allwinner A10 Watchdog"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/allwinner/a20/a20_cpu_cfg.c b/sys/arm/allwinner/a20/a20_cpu_cfg.c index 4e6395b..dd560f8 100644 --- a/sys/arm/allwinner/a20/a20_cpu_cfg.c +++ b/sys/arm/allwinner/a20/a20_cpu_cfg.c @@ -70,6 +70,9 @@ static int a20_cpu_cfg_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "allwinner,sun7i-cpu-cfg")) { device_set_desc(dev, "A20 CPU Configuration Module"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/allwinner/aintc.c b/sys/arm/allwinner/aintc.c index bfa35f5..ca537eb 100644 --- a/sys/arm/allwinner/aintc.c +++ b/sys/arm/allwinner/aintc.c @@ -97,6 +97,10 @@ static struct a10_aintc_softc *a10_aintc_sc = NULL; static int a10_aintc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-ic")) return (ENXIO); device_set_desc(dev, "A10 AINTC Interrupt Controller"); |