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/dev | |
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/dev')
-rw-r--r-- | sys/dev/altera/atse/if_atse_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/altera/avgen/altera_avgen_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/altera/sdcard/altera_sdcard_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/ata/chipsets/ata-fsl.c | 3 | ||||
-rw-r--r-- | sys/dev/cesa/cesa.c | 4 | ||||
-rw-r--r-- | sys/dev/cfi/cfi_bus_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/fdt/simplebus.c | 3 | ||||
-rw-r--r-- | sys/dev/ffec/if_ffec.c | 3 | ||||
-rw-r--r-- | sys/dev/mge/if_mge.c | 3 | ||||
-rw-r--r-- | sys/dev/mvs/mvs_soc.c | 3 | ||||
-rw-r--r-- | sys/dev/quicc/quicc_bfe_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/sdhci/sdhci_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/sec/sec.c | 3 | ||||
-rw-r--r-- | sys/dev/terasic/de4led/terasic_de4led_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/terasic/mtl/terasic_mtl_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/tsec/if_tsec_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/uart/uart_bus_fdt.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/controller/dwc_otg_fdt.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/controller/ehci_fsl.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/controller/ehci_imx.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/controller/ehci_mv.c | 3 |
22 files changed, 68 insertions, 0 deletions
diff --git a/sys/dev/altera/atse/if_atse_fdt.c b/sys/dev/altera/atse/if_atse_fdt.c index af5531d..64d5b29 100644 --- a/sys/dev/altera/atse/if_atse_fdt.c +++ b/sys/dev/altera/atse/if_atse_fdt.c @@ -65,6 +65,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 899211c..c14f944 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 01974ff..05a6c99 100644 --- a/sys/dev/ffec/if_ffec.c +++ b/sys/dev/ffec/if_ffec.c @@ -1713,6 +1713,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 88c4f0d..860e373 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -1387,6 +1387,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 76080bd..a4fe3d8 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); |