]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/zynq_sdhci.c
mmc: matsushita-common: Handle bus width 0
[u-boot] / drivers / mmc / zynq_sdhci.c
index 70ad5734e1701642c13cca6571c20d6fdeebedf5..9463a06ebc6cc98169d48a755cf69b09f11231d4 100644 (file)
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <malloc.h>
 #include <sdhci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifndef CONFIG_ZYNQ_SDHCI_MIN_FREQ
-# define CONFIG_ZYNQ_SDHCI_MIN_FREQ    0
-#endif
-
 struct arasan_sdhci_plat {
        struct mmc_config cfg;
        struct mmc mmc;
@@ -83,7 +79,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
        host->name = dev->name;
        host->ioaddr = (void *)devfdt_get_addr(dev);
 
-       plat->f_max = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
+       plat->f_max = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
                                "max-frequency", CONFIG_ZYNQ_SDHCI_MAX_FREQ);
 
        return 0;