Author: ian
Date: Sat Nov  2 22:44:35 2013
New Revision: 257561
URL: http://svnweb.freebsd.org/changeset/base/257561

Log:
  Bugfix:  the attach routine needs to use the same table of fdt compat
  strings that the probe routine used.

Modified:
  head/sys/arm/freescale/imx/imx_sdhci.c

Modified: head/sys/arm/freescale/imx/imx_sdhci.c
==============================================================================
--- head/sys/arm/freescale/imx/imx_sdhci.c      Sat Nov  2 22:18:41 2013        
(r257560)
+++ head/sys/arm/freescale/imx/imx_sdhci.c      Sat Nov  2 22:44:35 2013        
(r257561)
@@ -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,
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to