summaryrefslogtreecommitdiffstats
path: root/sys/arm/lpc
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
committerian <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
commit71d90c04a87e5d83dd12a18e730bf5a49659d712 (patch)
treef7a07f25a40a264286f85b60ecb1346dd35ef91b /sys/arm/lpc
parent34475ded0642e033e494961693b123591dd96ff8 (diff)
downloadFreeBSD-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/lpc')
-rw-r--r--sys/arm/lpc/if_lpe.c3
-rw-r--r--sys/arm/lpc/lpc_dmac.c4
-rw-r--r--sys/arm/lpc/lpc_fb.c4
-rw-r--r--sys/arm/lpc/lpc_gpio.c4
-rw-r--r--sys/arm/lpc/lpc_intc.c3
-rw-r--r--sys/arm/lpc/lpc_mmc.c4
-rw-r--r--sys/arm/lpc/lpc_ohci.c4
-rw-r--r--sys/arm/lpc/lpc_pwr.c3
-rw-r--r--sys/arm/lpc/lpc_rtc.c3
-rw-r--r--sys/arm/lpc/lpc_spi.c4
-rw-r--r--sys/arm/lpc/lpc_timer.c3
11 files changed, 39 insertions, 0 deletions
diff --git a/sys/arm/lpc/if_lpe.c b/sys/arm/lpc/if_lpe.c
index f8a8659..50f5f37 100644
--- a/sys/arm/lpc/if_lpe.c
+++ b/sys/arm/lpc/if_lpe.c
@@ -190,6 +190,9 @@ static int
lpe_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,ethernet"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_dmac.c b/sys/arm/lpc/lpc_dmac.c
index 6c872ae..a4c64c6 100644
--- a/sys/arm/lpc/lpc_dmac.c
+++ b/sys/arm/lpc/lpc_dmac.c
@@ -90,6 +90,10 @@ static void lpc_dmac_intr(void *);
static int lpc_dmac_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,dmac"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_fb.c b/sys/arm/lpc/lpc_fb.c
index 0cc92b5..5385d30 100644
--- a/sys/arm/lpc/lpc_fb.c
+++ b/sys/arm/lpc/lpc_fb.c
@@ -138,6 +138,10 @@ static struct cdevsw lpc_fb_cdevsw = {
static int
lpc_fb_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,fb"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_gpio.c b/sys/arm/lpc/lpc_gpio.c
index 33b32ee..9c13d62 100644
--- a/sys/arm/lpc/lpc_gpio.c
+++ b/sys/arm/lpc/lpc_gpio.c
@@ -160,6 +160,10 @@ static struct lpc_gpio_softc *lpc_gpio_sc = NULL;
static int
lpc_gpio_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,gpio"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_intc.c b/sys/arm/lpc/lpc_intc.c
index b39704d..3137e89 100644
--- a/sys/arm/lpc/lpc_intc.c
+++ b/sys/arm/lpc/lpc_intc.c
@@ -68,6 +68,9 @@ static int
lpc_intc_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,pic"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_mmc.c b/sys/arm/lpc/lpc_mmc.c
index 257487d..5dc6722 100644
--- a/sys/arm/lpc/lpc_mmc.c
+++ b/sys/arm/lpc/lpc_mmc.c
@@ -166,6 +166,10 @@ static struct lpc_dmac_channel_config lpc_mmc_dma_txconf = {
static int
lpc_mmc_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,mmc"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_ohci.c b/sys/arm/lpc/lpc_ohci.c
index c6ebef9..d05b3a3 100644
--- a/sys/arm/lpc/lpc_ohci.c
+++ b/sys/arm/lpc/lpc_ohci.c
@@ -98,6 +98,10 @@ static void lpc_isp3101_configure(device_t dev, struct ohci_softc *);
static int
lpc_ohci_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,usb-ohci"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_pwr.c b/sys/arm/lpc/lpc_pwr.c
index 53127f9..2b56e8c 100644
--- a/sys/arm/lpc/lpc_pwr.c
+++ b/sys/arm/lpc/lpc_pwr.c
@@ -65,6 +65,9 @@ static int
lpc_pwr_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,pwr"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_rtc.c b/sys/arm/lpc/lpc_rtc.c
index d2812482..80c378d 100644
--- a/sys/arm/lpc/lpc_rtc.c
+++ b/sys/arm/lpc/lpc_rtc.c
@@ -63,6 +63,9 @@ static int
lpc_rtc_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,rtc"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_spi.c b/sys/arm/lpc/lpc_spi.c
index 96a0e26..5bf8f7d 100644
--- a/sys/arm/lpc/lpc_spi.c
+++ b/sys/arm/lpc/lpc_spi.c
@@ -85,6 +85,10 @@ static int lpc_spi_transfer(device_t, device_t, struct spi_command *);
static int
lpc_spi_probe(device_t dev)
{
+
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,spi"))
return (ENXIO);
diff --git a/sys/arm/lpc/lpc_timer.c b/sys/arm/lpc/lpc_timer.c
index 0ceee9e..5769435 100644
--- a/sys/arm/lpc/lpc_timer.c
+++ b/sys/arm/lpc/lpc_timer.c
@@ -111,6 +111,9 @@ static int
lpc_timer_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "lpc,timer"))
return (ENXIO);
OpenPOWER on IntegriCloud