From eccd123c2c7b7eb7625f66a9cfb694f20992365a Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 2 Nov 2013 22:44:35 +0000 Subject: [PATCH] Bugfix: the attach routine needs to use the same table of fdt compat strings that the probe routine used. --- sys/arm/freescale/imx/imx_sdhci.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c index 45428f6bb375..ff30d14801ea 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,