diff options
author | ian <ian@FreeBSD.org> | 2014-05-15 16:11:06 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-15 16:11:06 +0000 |
commit | 20a269e6c7378fda94043f8419c9becbde7f427a (patch) | |
tree | 675ee07ce869e3193726664b9896e280b0c03239 | |
parent | ffa1dc9425d9681f0da92d9266010bcc0f81d399 (diff) | |
download | FreeBSD-src-20a269e6c7378fda94043f8419c9becbde7f427a.zip FreeBSD-src-20a269e6c7378fda94043f8419c9becbde7f427a.tar.gz |
MFC r261410
Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.
119 files changed, 393 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 0563601..a5af52d 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"); diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 1b8fd1f..8de31bf 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -244,6 +244,9 @@ static int arm_tmr_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,armv7-timer")) return (ENXIO); diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index a6acc96..9472edb 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -129,6 +129,9 @@ static int arm_gic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,gic")) return (ENXIO); device_set_desc(dev, "ARM Generic Interrupt Controller"); diff --git a/sys/arm/arm/mpcore_timer.c b/sys/arm/arm/mpcore_timer.c index e2f6fbd..5024efe 100644 --- a/sys/arm/arm/mpcore_timer.c +++ b/sys/arm/arm/mpcore_timer.c @@ -247,6 +247,10 @@ arm_tmr_intr(void *arg) static int arm_tmr_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,mpcore-timers")) return (ENXIO); diff --git a/sys/arm/arm/pl190.c b/sys/arm/arm/pl190.c index 3e0671c..01cd84a 100644 --- a/sys/arm/arm/pl190.c +++ b/sys/arm/arm/pl190.c @@ -78,6 +78,10 @@ static struct pl190_intc_softc *pl190_intc_sc = NULL; static int pl190_intc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,versatile-vic")) return (ENXIO); device_set_desc(dev, "ARM PL190 VIC"); diff --git a/sys/arm/arm/pl310.c b/sys/arm/arm/pl310.c index 11ea5c7..64e98b6 100644 --- a/sys/arm/arm/pl310.c +++ b/sys/arm/arm/pl310.c @@ -281,6 +281,9 @@ static int pl310_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,pl310")) return (ENXIO); device_set_desc(dev, "PL310 L2 cache controller"); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c index 9ee97b7..33e4769 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c @@ -222,6 +222,9 @@ static int bcm_bsc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-bsc")) return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_dma.c b/sys/arm/broadcom/bcm2835/bcm2835_dma.c index e86cc11..6a2967a 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_dma.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_dma.c @@ -637,6 +637,9 @@ static int bcm_dma_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-dma")) return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 7e8ead7..4619715 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -674,6 +674,10 @@ bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc) static int bcm_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-gpio")) return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_intr.c b/sys/arm/broadcom/bcm2835/bcm2835_intr.c index 09092a0..4a94c69 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_intr.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_intr.c @@ -90,6 +90,10 @@ static struct bcm_intc_softc *bcm_intc_sc = NULL; static int bcm_intc_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-armctrl-ic")) return (ENXIO); device_set_desc(dev, "BCM2835 Interrupt Controller"); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c index 3ad1aa3..7628eb6 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_mbox.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_mbox.c @@ -128,6 +128,9 @@ static int bcm_mbox_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-mbox")) { device_set_desc(dev, "BCM2835 VideoCore Mailbox"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index eb8df2a..82d3026 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -151,6 +151,10 @@ bcm_dmamap_cb(void *arg, bus_dma_segment_t *segs, static int bcm_sdhci_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-sdhci")) return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_spi.c b/sys/arm/broadcom/bcm2835/bcm2835_spi.c index 47a7d98..c9f6d33 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_spi.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_spi.c @@ -231,6 +231,9 @@ static int bcm_spi_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-spi")) return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c index a727366..1dc8d5d 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c @@ -186,6 +186,9 @@ static int bcm_systimer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-system-timer")) { device_set_desc(dev, "BCM2835 System Timer"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_wdog.c b/sys/arm/broadcom/bcm2835/bcm2835_wdog.c index c8570cb..9a4d68b 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_wdog.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_wdog.c @@ -86,6 +86,9 @@ static int bcmwd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "broadcom,bcm2835-wdt")) { device_set_desc(dev, "BCM2708/2835 Watchdog"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/freescale/imx/i2c.c b/sys/arm/freescale/imx/i2c.c index a452c6d..dd74a7d 100644 --- a/sys/arm/freescale/imx/i2c.c +++ b/sys/arm/freescale/imx/i2c.c @@ -224,6 +224,9 @@ i2c_probe(device_t dev) { struct i2c_softc *sc; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx-i2c")) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx51_ccm.c b/sys/arm/freescale/imx/imx51_ccm.c index 86cf87a..61fdfdc 100644 --- a/sys/arm/freescale/imx/imx51_ccm.c +++ b/sys/arm/freescale/imx/imx51_ccm.c @@ -141,6 +141,9 @@ static int imxccm_match(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-ccm") && !ofw_bus_is_compatible(dev, "fsl,imx53-ccm")) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx51_gpio.c b/sys/arm/freescale/imx/imx51_gpio.c index f9890a8..1c1eed1 100644 --- a/sys/arm/freescale/imx/imx51_gpio.c +++ b/sys/arm/freescale/imx/imx51_gpio.c @@ -370,6 +370,9 @@ static int imx51_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio") || ofw_bus_is_compatible(dev, "fsl,imx53-gpio")) { device_set_desc(dev, "i.MX515 GPIO Controller"); diff --git a/sys/arm/freescale/imx/imx51_iomux.c b/sys/arm/freescale/imx/imx51_iomux.c index 5096f2c..18738a1 100644 --- a/sys/arm/freescale/imx/imx51_iomux.c +++ b/sys/arm/freescale/imx/imx51_iomux.c @@ -106,6 +106,9 @@ static int iomux_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-iomux") && !ofw_bus_is_compatible(dev, "fsl,imx53-iomux")) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx51_ipuv3.c b/sys/arm/freescale/imx/imx51_ipuv3.c index a7781f3..c86b7aa 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3.c +++ b/sys/arm/freescale/imx/imx51_ipuv3.c @@ -254,6 +254,9 @@ ipu3_fb_probe(device_t dev) { int error; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c index 8756ba3..3bb7218 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c +++ b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c @@ -184,6 +184,9 @@ static int ipu3_fb_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,ipu3")) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx6_anatop.c b/sys/arm/freescale/imx/imx6_anatop.c index d50bab2..893fb18 100644 --- a/sys/arm/freescale/imx/imx6_anatop.c +++ b/sys/arm/freescale/imx/imx6_anatop.c @@ -126,6 +126,9 @@ static int imx6_anatop_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-anatop") == 0) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx6_ccm.c b/sys/arm/freescale/imx/imx6_ccm.c index 0f1c610..e42335a 100644 --- a/sys/arm/freescale/imx/imx6_ccm.c +++ b/sys/arm/freescale/imx/imx6_ccm.c @@ -121,6 +121,9 @@ static int ccm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-ccm") == 0) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx6_usbphy.c b/sys/arm/freescale/imx/imx6_usbphy.c index a184190..7f3e362 100644 --- a/sys/arm/freescale/imx/imx6_usbphy.c +++ b/sys/arm/freescale/imx/imx6_usbphy.c @@ -160,6 +160,9 @@ static int usbphy_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,imx6q-usbphy") == 0) return (ENXIO); diff --git a/sys/arm/freescale/imx/imx_gpt.c b/sys/arm/freescale/imx/imx_gpt.c index 9b4f6a5..0e32bc9 100644 --- a/sys/arm/freescale/imx/imx_gpt.c +++ b/sys/arm/freescale/imx/imx_gpt.c @@ -121,6 +121,9 @@ static int imx_gpt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale i.MX GPT timer"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/freescale/imx/imx_nop_usbphy.c b/sys/arm/freescale/imx/imx_nop_usbphy.c index 50d9f59..38473dd 100644 --- a/sys/arm/freescale/imx/imx_nop_usbphy.c +++ b/sys/arm/freescale/imx/imx_nop_usbphy.c @@ -89,6 +89,9 @@ static int usbphy_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale USB PHY"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c index ff30d14..baa9162 100644 --- a/sys/arm/freescale/imx/imx_sdhci.c +++ b/sys/arm/freescale/imx/imx_sdhci.c @@ -643,6 +643,9 @@ static int imx_sdhci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { case HWTYPE_ESDHC: device_set_desc(dev, "Freescale eSDHC controller"); diff --git a/sys/arm/freescale/imx/imx_wdog.c b/sys/arm/freescale/imx/imx_wdog.c index 02c454e..cadd1d7 100644 --- a/sys/arm/freescale/imx/imx_wdog.c +++ b/sys/arm/freescale/imx/imx_wdog.c @@ -130,6 +130,9 @@ static int imx_wdog_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-wdt") && !ofw_bus_is_compatible(dev, "fsl,imx53-wdt")) return (ENXIO); diff --git a/sys/arm/freescale/imx/tzic.c b/sys/arm/freescale/imx/tzic.c index b1a3b07..39548dc 100644 --- a/sys/arm/freescale/imx/tzic.c +++ b/sys/arm/freescale/imx/tzic.c @@ -76,6 +76,10 @@ static void tzic_post_filter(void *); static int tzic_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,tzic")) { device_set_desc(dev, "TrustZone Interrupt Controller"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/freescale/vybrid/vf_anadig.c b/sys/arm/freescale/vybrid/vf_anadig.c index afa860d..e5c563c 100644 --- a/sys/arm/freescale/vybrid/vf_anadig.c +++ b/sys/arm/freescale/vybrid/vf_anadig.c @@ -114,6 +114,9 @@ static int anadig_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-anadig")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_ccm.c b/sys/arm/freescale/vybrid/vf_ccm.c index ddcaaae..9d9b517 100644 --- a/sys/arm/freescale/vybrid/vf_ccm.c +++ b/sys/arm/freescale/vybrid/vf_ccm.c @@ -339,6 +339,9 @@ static int ccm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-ccm")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_ehci.c b/sys/arm/freescale/vybrid/vf_ehci.c index 76edb85..482a4ee 100644 --- a/sys/arm/freescale/vybrid/vf_ehci.c +++ b/sys/arm/freescale/vybrid/vf_ehci.c @@ -176,6 +176,9 @@ static int vybrid_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "fsl,mvf600-usb-ehci") == 0) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_gpio.c b/sys/arm/freescale/vybrid/vf_gpio.c index 8a7b9b1..3b8afc2 100644 --- a/sys/arm/freescale/vybrid/vf_gpio.c +++ b/sys/arm/freescale/vybrid/vf_gpio.c @@ -123,6 +123,9 @@ static int vf_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-gpio")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_iomuxc.c b/sys/arm/freescale/vybrid/vf_iomuxc.c index 20b1fd1..8bfaa8d 100644 --- a/sys/arm/freescale/vybrid/vf_iomuxc.c +++ b/sys/arm/freescale/vybrid/vf_iomuxc.c @@ -90,6 +90,9 @@ static int iomuxc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-iomuxc")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_mscm.c b/sys/arm/freescale/vybrid/vf_mscm.c index 5741627..b07181e 100644 --- a/sys/arm/freescale/vybrid/vf_mscm.c +++ b/sys/arm/freescale/vybrid/vf_mscm.c @@ -75,6 +75,9 @@ static int mscm_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-mscm")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_nfc.c b/sys/arm/freescale/vybrid/vf_nfc.c index 8132200..28db4c6 100644 --- a/sys/arm/freescale/vybrid/vf_nfc.c +++ b/sys/arm/freescale/vybrid/vf_nfc.c @@ -171,6 +171,9 @@ static int vf_nand_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-nand")) return (ENXIO); diff --git a/sys/arm/freescale/vybrid/vf_src.c b/sys/arm/freescale/vybrid/vf_src.c index 0fe6f3b..ac9b23b 100644 --- a/sys/arm/freescale/vybrid/vf_src.c +++ b/sys/arm/freescale/vybrid/vf_src.c @@ -102,6 +102,9 @@ static int src_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-src")) return (ENXIO); 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); diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index 5f79bef..1bdb81b 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -125,6 +125,9 @@ static int mv_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,gpio")) return (ENXIO); diff --git a/sys/arm/mv/ic.c b/sys/arm/mv/ic.c index 96159a7..244b3fd 100644 --- a/sys/arm/mv/ic.c +++ b/sys/arm/mv/ic.c @@ -80,6 +80,9 @@ static int mv_ic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,pic")) return (ENXIO); diff --git a/sys/arm/mv/mpic.c b/sys/arm/mv/mpic.c index 0a1be1d..813caf4 100644 --- a/sys/arm/mv/mpic.c +++ b/sys/arm/mv/mpic.c @@ -127,6 +127,9 @@ static int mv_mpic_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,mpic")) return (ENXIO); diff --git a/sys/arm/mv/mv_sata.c b/sys/arm/mv/mv_sata.c index 87b3823..3c6d0d5 100644 --- a/sys/arm/mv/mv_sata.c +++ b/sys/arm/mv/mv_sata.c @@ -185,6 +185,9 @@ sata_probe(device_t dev) struct sata_softc *sc; uint32_t d, r; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,sata")) return (ENXIO); diff --git a/sys/arm/mv/mv_ts.c b/sys/arm/mv/mv_ts.c index ec4ee4f..7c2a113 100644 --- a/sys/arm/mv/mv_ts.c +++ b/sys/arm/mv/mv_ts.c @@ -59,6 +59,9 @@ ts_probe(device_t dev) { uint32_t d, r; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,ts")) return (ENXIO); soc_id(&d, &r); diff --git a/sys/arm/mv/rtc.c b/sys/arm/mv/rtc.c index 1605187..caa28fe 100644 --- a/sys/arm/mv/rtc.c +++ b/sys/arm/mv/rtc.c @@ -97,6 +97,9 @@ static int mv_rtc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,rtc")) return (ENXIO); diff --git a/sys/arm/mv/timer.c b/sys/arm/mv/timer.c index 91305b0..3c6f149 100644 --- a/sys/arm/mv/timer.c +++ b/sys/arm/mv/timer.c @@ -108,6 +108,9 @@ static int mv_timer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,timer")) return (ENXIO); diff --git a/sys/arm/mv/twsi.c b/sys/arm/mv/twsi.c index 7b284ae..fa6f5d7 100644 --- a/sys/arm/mv/twsi.c +++ b/sys/arm/mv/twsi.c @@ -305,6 +305,9 @@ static int mv_twsi_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,twsi")) return (ENXIO); diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 27a0126..22dc723 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -421,6 +421,9 @@ static int rk30_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "rockchip,rk30xx-gpio")) return (ENXIO); diff --git a/sys/arm/rockchip/rk30xx_grf.c b/sys/arm/rockchip/rk30xx_grf.c index a2ff38a..1b1f6d9 100644 --- a/sys/arm/rockchip/rk30xx_grf.c +++ b/sys/arm/rockchip/rk30xx_grf.c @@ -70,6 +70,9 @@ static int rk30_grf_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-grf")) { device_set_desc(dev, "RK30XX General Register File"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/rockchip/rk30xx_pmu.c b/sys/arm/rockchip/rk30xx_pmu.c index 72f104d..9e264b9 100644 --- a/sys/arm/rockchip/rk30xx_pmu.c +++ b/sys/arm/rockchip/rk30xx_pmu.c @@ -70,6 +70,9 @@ static int rk30_pmu_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-pmu")) { device_set_desc(dev, "RK30XX PMU"); return(BUS_PROBE_DEFAULT); diff --git a/sys/arm/rockchip/rk30xx_wdog.c b/sys/arm/rockchip/rk30xx_wdog.c index f5761c9..d6c6092 100644 --- a/sys/arm/rockchip/rk30xx_wdog.c +++ b/sys/arm/rockchip/rk30xx_wdog.c @@ -84,6 +84,9 @@ static int rk30_wd_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-wdt")) { device_set_desc(dev, "Rockchip RK30XX Watchdog"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/samsung/exynos/arch_timer.c b/sys/arm/samsung/exynos/arch_timer.c index 86bb6f3..9408df5 100644 --- a/sys/arm/samsung/exynos/arch_timer.c +++ b/sys/arm/samsung/exynos/arch_timer.c @@ -71,6 +71,10 @@ static struct resource_spec arm_tmr_spec[] = { static int arm_tmr_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "exynos,mct")) return (ENXIO); diff --git a/sys/arm/samsung/exynos/ehci_exynos5.c b/sys/arm/samsung/exynos/ehci_exynos5.c index 71c43d8..7022d46 100644 --- a/sys/arm/samsung/exynos/ehci_exynos5.c +++ b/sys/arm/samsung/exynos/ehci_exynos5.c @@ -147,6 +147,9 @@ static int exynos_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "exynos,usb-ehci") == 0) return (ENXIO); diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c index a8887d3..659db15 100644 --- a/sys/arm/ti/aintc.c +++ b/sys/arm/ti/aintc.c @@ -81,6 +81,10 @@ static struct ti_aintc_softc *ti_aintc_sc = NULL; static int ti_aintc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "ti,aintc")) return (ENXIO); device_set_desc(dev, "TI AINTC Interrupt Controller"); 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); diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index cb322a6..ab0824e 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -445,6 +445,9 @@ static int cpsw_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,cpsw")) return (ENXIO); diff --git a/sys/arm/ti/omap4/omap4_prcm_clks.c b/sys/arm/ti/omap4/omap4_prcm_clks.c index 034e615..5d8f49a 100644 --- a/sys/arm/ti/omap4/omap4_prcm_clks.c +++ b/sys/arm/ti/omap4/omap4_prcm_clks.c @@ -1363,6 +1363,10 @@ omap4_prcm_reset(void) static int omap4_prcm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,omap4_prcm")) return (ENXIO); diff --git a/sys/arm/ti/ti_edma3.c b/sys/arm/ti/ti_edma3.c index ea1ee28..1489ff7 100644 --- a/sys/arm/ti/ti_edma3.c +++ b/sys/arm/ti/ti_edma3.c @@ -142,6 +142,10 @@ static struct { static int ti_edma3_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,edma3")) return (ENXIO); diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index c27ff20..a6bf094 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -650,6 +650,10 @@ ti_gpio_intr(void *arg) static int ti_gpio_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,gpio")) return (ENXIO); diff --git a/sys/arm/ti/ti_i2c.c b/sys/arm/ti/ti_i2c.c index f23a8ea..089c2de 100644 --- a/sys/arm/ti/ti_i2c.c +++ b/sys/arm/ti/ti_i2c.c @@ -1020,6 +1020,10 @@ ti_i2c_deactivate(device_t dev) static int ti_i2c_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,i2c")) return (ENXIO); diff --git a/sys/arm/ti/ti_mbox.c b/sys/arm/ti/ti_mbox.c index da00726..994b0a0 100644 --- a/sys/arm/ti/ti_mbox.c +++ b/sys/arm/ti/ti_mbox.c @@ -119,6 +119,10 @@ ti_mbox_reg_write(struct ti_mbox_softc *sc, uint16_t reg, uint32_t val) static int ti_mbox_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,system-mbox")) { device_set_desc(dev, "TI System Mailbox"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/ti/ti_mmchs.c b/sys/arm/ti/ti_mmchs.c index 281d1cd..f6ef6f6 100644 --- a/sys/arm/ti/ti_mmchs.c +++ b/sys/arm/ti/ti_mmchs.c @@ -1656,6 +1656,10 @@ errout: static int ti_mmchs_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,mmchs")) return (ENXIO); diff --git a/sys/arm/ti/ti_pruss.c b/sys/arm/ti/ti_pruss.c index 8b9ab4b..f7f7fbd 100644 --- a/sys/arm/ti/ti_pruss.c +++ b/sys/arm/ti/ti_pruss.c @@ -145,6 +145,10 @@ ti_pruss_reg_write(struct ti_pruss_softc *sc, uint32_t reg, uint32_t val) static int ti_pruss_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "ti,pruss-v1") || ofw_bus_is_compatible(dev, "ti,pruss-v2")) { device_set_desc(dev, "TI Programmable Realtime Unit Subsystem"); diff --git a/sys/arm/ti/ti_scm.c b/sys/arm/ti/ti_scm.c index aafcf2d..4c20d96 100644 --- a/sys/arm/ti/ti_scm.c +++ b/sys/arm/ti/ti_scm.c @@ -418,6 +418,10 @@ ti_scm_padconf_init_from_fdt(struct ti_scm_softc *sc) static int ti_scm_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,scm")) return (ENXIO); diff --git a/sys/arm/ti/ti_sdhci.c b/sys/arm/ti/ti_sdhci.c index 218983b..ee044f5 100644 --- a/sys/arm/ti/ti_sdhci.c +++ b/sys/arm/ti/ti_sdhci.c @@ -582,6 +582,9 @@ static int ti_sdhci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "TI MMCHS (SDHCI 2.0)"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/ti/ti_sdma.c b/sys/arm/ti/ti_sdma.c index 4c55c41..4e9dbfe 100644 --- a/sys/arm/ti/ti_sdma.c +++ b/sys/arm/ti/ti_sdma.c @@ -1127,6 +1127,10 @@ ti_sdma_set_addr_mode(unsigned int ch, unsigned int src_mode, static int ti_sdma_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,sdma")) return (ENXIO); diff --git a/sys/arm/ti/usb/omap_ehci.c b/sys/arm/ti/usb/omap_ehci.c index 1f34f12..c7a80a0 100644 --- a/sys/arm/ti/usb/omap_ehci.c +++ b/sys/arm/ti/usb/omap_ehci.c @@ -736,6 +736,10 @@ omap_ehci_shutdown(device_t dev) static int omap_ehci_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,usb-ehci")) return (ENXIO); diff --git a/sys/arm/versatile/if_smc_fdt.c b/sys/arm/versatile/if_smc_fdt.c index 8334c27..d010f93 100644 --- a/sys/arm/versatile/if_smc_fdt.c +++ b/sys/arm/versatile/if_smc_fdt.c @@ -64,6 +64,9 @@ smc_fdt_probe(device_t dev) { struct smc_softc *sc; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "smsc,lan91c111")) { sc = device_get_softc(dev); sc->smc_usemem = 1; diff --git a/sys/arm/versatile/pl050.c b/sys/arm/versatile/pl050.c index 72569dc..ec26f2a 100644 --- a/sys/arm/versatile/pl050.c +++ b/sys/arm/versatile/pl050.c @@ -609,6 +609,9 @@ static int pl050_kmi_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "arm,pl050")) { device_set_desc(dev, "PL050 Keyboard/Mouse Interface"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/versatile/sp804.c b/sys/arm/versatile/sp804.c index 16db30d..5f986b1 100644 --- a/sys/arm/versatile/sp804.c +++ b/sys/arm/versatile/sp804.c @@ -184,6 +184,9 @@ static int sp804_timer_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "arm,sp804")) { device_set_desc(dev, "SP804 System Timer"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/versatile/versatile_clcd.c b/sys/arm/versatile/versatile_clcd.c index daa09e7..1dd7778 100644 --- a/sys/arm/versatile/versatile_clcd.c +++ b/sys/arm/versatile/versatile_clcd.c @@ -232,6 +232,9 @@ static int versatile_clcdc_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "arm,pl110")) { device_set_desc(dev, "PL110 CLCD controller"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/versatile/versatile_pci.c b/sys/arm/versatile/versatile_pci.c index bc54245..0e48496 100644 --- a/sys/arm/versatile/versatile_pci.c +++ b/sys/arm/versatile/versatile_pci.c @@ -144,6 +144,9 @@ static int versatile_pci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "versatile,pci")) { device_set_desc(dev, "Versatile PCI controller"); return (BUS_PROBE_DEFAULT); diff --git a/sys/arm/versatile/versatile_sic.c b/sys/arm/versatile/versatile_sic.c index f401c30..99ffb27 100644 --- a/sys/arm/versatile/versatile_sic.c +++ b/sys/arm/versatile/versatile_sic.c @@ -73,6 +73,10 @@ struct versatile_sic_softc { static int versatile_sic_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "arm,versatile-sic")) return (ENXIO); device_set_desc(dev, "ARM Versatile SIC"); diff --git a/sys/arm/xilinx/zy7_devcfg.c b/sys/arm/xilinx/zy7_devcfg.c index 9b49e85..ae96dd3 100644 --- a/sys/arm/xilinx/zy7_devcfg.c +++ b/sys/arm/xilinx/zy7_devcfg.c @@ -519,6 +519,10 @@ zy7_devcfg_sysctl_pl_done(SYSCTL_HANDLER_ARGS) static int zy7_devcfg_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "xlnx,zy7_devcfg")) return (ENXIO); diff --git a/sys/arm/xilinx/zy7_ehci.c b/sys/arm/xilinx/zy7_ehci.c index cfe6dd4..c2ac818 100644 --- a/sys/arm/xilinx/zy7_ehci.c +++ b/sys/arm/xilinx/zy7_ehci.c @@ -193,6 +193,9 @@ static int zy7_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "xlnx,zy7_ehci")) return (ENXIO); diff --git a/sys/arm/xilinx/zy7_gpio.c b/sys/arm/xilinx/zy7_gpio.c index 65dcc67..77dc640 100644 --- a/sys/arm/xilinx/zy7_gpio.c +++ b/sys/arm/xilinx/zy7_gpio.c @@ -276,6 +276,9 @@ static int zy7_gpio_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "xlnx,zy7_gpio")) return (ENXIO); diff --git a/sys/arm/xilinx/zy7_slcr.c b/sys/arm/xilinx/zy7_slcr.c index c6c8866..e448d76 100644 --- a/sys/arm/xilinx/zy7_slcr.c +++ b/sys/arm/xilinx/zy7_slcr.c @@ -192,6 +192,10 @@ zy7_slcr_postload_pl(int en_level_shifters) static int zy7_slcr_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "xlnx,zy7_slcr")) return (ENXIO); diff --git a/sys/dev/altera/atse/if_atse_fdt.c b/sys/dev/altera/atse/if_atse_fdt.c index 30c6b67..31dae9e 100644 --- a/sys/dev/altera/atse/if_atse_fdt.c +++ b/sys/dev/altera/atse/if_atse_fdt.c @@ -64,6 +64,9 @@ static int atse_probe_fdt(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "altera,atse")) { device_set_desc(dev, "Altera Triple-Speed Ethernet MegaCore"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/altera/avgen/altera_avgen_fdt.c b/sys/dev/altera/avgen/altera_avgen_fdt.c index 2762ff4..d87027d 100644 --- a/sys/dev/altera/avgen/altera_avgen_fdt.c +++ b/sys/dev/altera/avgen/altera_avgen_fdt.c @@ -62,6 +62,9 @@ static int altera_avgen_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "sri-cambridge,avgen")) { device_set_desc(dev, "Generic Altera Avalon device attachment"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c b/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c index 47f39a4..c4ee8de 100644 --- a/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c +++ b/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c @@ -64,6 +64,9 @@ static int altera_jtag_uart_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "altera,jtag_uart-11_0")) { device_set_desc(dev, "Altera JTAG UART"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/altera/sdcard/altera_sdcard_fdt.c b/sys/dev/altera/sdcard/altera_sdcard_fdt.c index 027ca2d..da77aef 100644 --- a/sys/dev/altera/sdcard/altera_sdcard_fdt.c +++ b/sys/dev/altera/sdcard/altera_sdcard_fdt.c @@ -64,6 +64,9 @@ static int altera_sdcard_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "altera,sdcard_11_2011")) { device_set_desc(dev, "Altera Secure Data Card IP Core"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/ata/chipsets/ata-fsl.c b/sys/dev/ata/chipsets/ata-fsl.c index 17c91da..794802e 100644 --- a/sys/dev/ata/chipsets/ata-fsl.c +++ b/sys/dev/ata/chipsets/ata-fsl.c @@ -69,6 +69,9 @@ imx_ata_probe(device_t dev) { struct ata_pci_controller *ctrl; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,imx51-ata")) return (ENXIO); diff --git a/sys/dev/cesa/cesa.c b/sys/dev/cesa/cesa.c index bc9a568..ed6a7ef 100644 --- a/sys/dev/cesa/cesa.c +++ b/sys/dev/cesa/cesa.c @@ -972,6 +972,10 @@ cesa_setup_sram(struct cesa_softc *sc) static int cesa_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,cesa")) return (ENXIO); diff --git a/sys/dev/cfi/cfi_bus_fdt.c b/sys/dev/cfi/cfi_bus_fdt.c index 4a4f905..ad06326 100644 --- a/sys/dev/cfi/cfi_bus_fdt.c +++ b/sys/dev/cfi/cfi_bus_fdt.c @@ -67,6 +67,9 @@ static int cfi_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "cfi-flash")) return (ENXIO); diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c index 5661d81..ee968ae 100644 --- a/sys/dev/fdt/simplebus.c +++ b/sys/dev/fdt/simplebus.c @@ -128,6 +128,9 @@ static int simplebus_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "simple-bus") && (ofw_bus_get_type(dev) == NULL || strcmp(ofw_bus_get_type(dev), "soc") != 0)) diff --git a/sys/dev/ffec/if_ffec.c b/sys/dev/ffec/if_ffec.c index d3f2e63..42e1ed0 100644 --- a/sys/dev/ffec/if_ffec.c +++ b/sys/dev/ffec/if_ffec.c @@ -1711,6 +1711,9 @@ ffec_probe(device_t dev) { uintptr_t fectype; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; if (fectype == FECTYPE_NONE) return (ENXIO); diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c index 2f89aad..43d441e 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -1386,6 +1386,9 @@ static int mge_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,ge")) return (ENXIO); diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c index ca36993..14579d0 100644 --- a/sys/dev/mvs/mvs_soc.c +++ b/sys/dev/mvs/mvs_soc.c @@ -78,6 +78,9 @@ mvs_probe(device_t dev) int i; uint32_t devid, revid; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "mrvl,sata")) return (ENXIO); diff --git a/sys/dev/quicc/quicc_bfe_fdt.c b/sys/dev/quicc/quicc_bfe_fdt.c index 382b2a1..a7cd354 100644 --- a/sys/dev/quicc/quicc_bfe_fdt.c +++ b/sys/dev/quicc/quicc_bfe_fdt.c @@ -75,6 +75,9 @@ quicc_fdt_probe(device_t dev) phandle_t par; pcell_t clock; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,cpm2")) return (ENXIO); diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c index e92b158..65eac6d 100644 --- a/sys/dev/sdhci/sdhci_fdt.c +++ b/sys/dev/sdhci/sdhci_fdt.c @@ -157,6 +157,9 @@ sdhci_fdt_probe(device_t dev) sc->quirks = 0; sc->num_slots = 1; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "sdhci_generic")) { device_set_desc(dev, "generic fdt SDHCI controller"); } else if (ofw_bus_is_compatible(dev, "xlnx,zy7_sdhci")) { diff --git a/sys/dev/sec/sec.c b/sys/dev/sec/sec.c index 1f684d0..3b99a3e 100644 --- a/sys/dev/sec/sec.c +++ b/sys/dev/sec/sec.c @@ -199,6 +199,9 @@ sec_probe(device_t dev) struct sec_softc *sc; uint64_t id; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "fsl,sec2.0")) return (ENXIO); diff --git a/sys/dev/terasic/de4led/terasic_de4led_fdt.c b/sys/dev/terasic/de4led/terasic_de4led_fdt.c index 0888d6d..feab933 100644 --- a/sys/dev/terasic/de4led/terasic_de4led_fdt.c +++ b/sys/dev/terasic/de4led/terasic_de4led_fdt.c @@ -62,6 +62,9 @@ static int terasic_de4led_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "sri-cambridge,de4led")) { device_set_desc(dev, "Terasic DE4 8-element LED"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/terasic/mtl/terasic_mtl_fdt.c b/sys/dev/terasic/mtl/terasic_mtl_fdt.c index 7ffffb2..0a9b268 100644 --- a/sys/dev/terasic/mtl/terasic_mtl_fdt.c +++ b/sys/dev/terasic/mtl/terasic_mtl_fdt.c @@ -59,6 +59,9 @@ static int terasic_mtl_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_is_compatible(dev, "sri-cambridge,mtl")) { device_set_desc(dev, "Terasic Multi-touch LCD (MTL)"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/tsec/if_tsec_fdt.c b/sys/dev/tsec/if_tsec_fdt.c index 8836851..8d4b5a7 100644 --- a/sys/dev/tsec/if_tsec_fdt.c +++ b/sys/dev/tsec/if_tsec_fdt.c @@ -110,6 +110,9 @@ tsec_fdt_probe(device_t dev) struct tsec_softc *sc; uint32_t id; + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_get_type(dev) == NULL || strcmp(ofw_bus_get_type(dev), "network") != 0) return (ENXIO); diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c index 3630b9c..f434f4f 100644 --- a/sys/dev/uart/uart_bus_fdt.c +++ b/sys/dev/uart/uart_bus_fdt.c @@ -134,6 +134,9 @@ uart_fdt_probe(device_t dev) sc = device_get_softc(dev); + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + cd = ofw_bus_search_compatible(dev, compat_data); if (cd->ocd_data == (uintptr_t)NULL) return (ENXIO); diff --git a/sys/dev/usb/controller/dwc_otg_fdt.c b/sys/dev/usb/controller/dwc_otg_fdt.c index ac7a18d..0f93286 100644 --- a/sys/dev/usb/controller/dwc_otg_fdt.c +++ b/sys/dev/usb/controller/dwc_otg_fdt.c @@ -75,6 +75,10 @@ struct dwc_otg_super_softc { static int dwc_otg_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2")) return (ENXIO); diff --git a/sys/dev/usb/controller/ehci_fsl.c b/sys/dev/usb/controller/ehci_fsl.c index 6b485b5..7e728d2 100644 --- a/sys/dev/usb/controller/ehci_fsl.c +++ b/sys/dev/usb/controller/ehci_fsl.c @@ -212,6 +212,9 @@ static int fsl_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (((ofw_bus_is_compatible(dev, "fsl-usb2-dr")) == 0) && ((ofw_bus_is_compatible(dev, "fsl-usb2-mph")) == 0)) return (ENXIO); diff --git a/sys/dev/usb/controller/ehci_imx.c b/sys/dev/usb/controller/ehci_imx.c index 6d91b7b..d40f18d 100644 --- a/sys/dev/usb/controller/ehci_imx.c +++ b/sys/dev/usb/controller/ehci_imx.c @@ -161,6 +161,9 @@ static int imx_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale i.MX integrated USB controller"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/usb/controller/ehci_mv.c b/sys/dev/usb/controller/ehci_mv.c index a47e253..32a24b5 100644 --- a/sys/dev/usb/controller/ehci_mv.c +++ b/sys/dev/usb/controller/ehci_mv.c @@ -103,6 +103,9 @@ static int mv_ehci_probe(device_t self) { + if (!ofw_bus_status_okay(self)) + return (ENXIO); + if (!ofw_bus_is_compatible(self, "mrvl,usb-ehci")) return (ENXIO); diff --git a/sys/mips/beri/beri_pic.c b/sys/mips/beri/beri_pic.c index f13f144..008732f 100644 --- a/sys/mips/beri/beri_pic.c +++ b/sys/mips/beri/beri_pic.c @@ -254,6 +254,9 @@ static int beripic_fdt_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "sri-cambridge,beri-pic")) return (ENXIO); diff --git a/sys/mips/beri/beri_simplebus.c b/sys/mips/beri/beri_simplebus.c index 58927f9..55b3149 100644 --- a/sys/mips/beri/beri_simplebus.c +++ b/sys/mips/beri/beri_simplebus.c @@ -144,6 +144,9 @@ static int simplebus_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "simple-bus")) return (ENXIO); |