summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-12-13 22:50:12 +0000
committerian <ian@FreeBSD.org>2013-12-13 22:50:12 +0000
commitbf695341803f0314602107f10800f4f6ebd9f759 (patch)
treec660807d3ad164814ffd708b23291f1f5a542b18 /sys/arm
parenta10cf699d19d6e06a61502e76369f7e65d92fe27 (diff)
downloadFreeBSD-src-bf695341803f0314602107f10800f4f6ebd9f759.zip
FreeBSD-src-bf695341803f0314602107f10800f4f6ebd9f759.tar.gz
MFC r257561:
Bugfix: the attach routine needs to use the same table of fdt compat strings that the probe routine used.
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/freescale/imx/imx_sdhci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c
index 45428f6..ff30d14 100644
--- a/sys/arm/freescale/imx/imx_sdhci.c
+++ b/sys/arm/freescale/imx/imx_sdhci.c
@@ -558,13 +558,9 @@ imx_sdhci_attach(device_t dev)
sc->dev = dev;
- if (ofw_bus_is_compatible(dev, "fsl,imx51-esdhc")) {
- sc->hwtype = HWTYPE_ESDHC;
- } else if (ofw_bus_is_compatible(dev, "fsl,imx-usdhc")) {
- sc->hwtype = HWTYPE_USDHC;
- } else {
+ sc->hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ if (sc->hwtype == HWTYPE_NONE)
panic("Impossible: not compatible in imx_sdhci_attach()");
- }
rid = 0;
sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
OpenPOWER on IntegriCloud