]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/exynos_dw_mmc.c
Merge branch 'master' of git://git.denx.de/u-boot-mmc
[u-boot] / drivers / mmc / exynos_dw_mmc.c
index 283befccfbe6ceca869b4cc51c1df0628570aaa1..40f7892ac80b757ef95ca723a1495d56110f3a93 100644 (file)
 #include <fdtdec.h>
 #include <libfdt.h>
 #include <malloc.h>
+#include <errno.h>
 #include <asm/arch/dwmmc.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
 #include <asm/gpio.h>
-#include <asm-generic/errno.h>
 
 #define        DWMMC_MAX_CH_NUM                4
 #define        DWMMC_MAX_FREQ                  52000000
@@ -264,15 +264,14 @@ static int exynos_dwmmc_probe(struct udevice *dev)
        struct dwmci_host *host = &priv->host;
        int err;
 
-       err = exynos_dwmci_get_config(gd->fdt_blob, dev->of_offset, host);
+       err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host);
        if (err)
                return err;
        err = do_dwmci_init(host);
        if (err)
                return err;
 
-       dwmci_setup_cfg(&plat->cfg, host->name, host->buswidth, host->caps,
-                       DWMMC_MAX_FREQ, DWMMC_MIN_FREQ);
+       dwmci_setup_cfg(&plat->cfg, host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ);
        host->mmc = &plat->mmc;
        host->mmc->priv = &priv->host;
        host->priv = dev;
@@ -284,13 +283,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
 static int exynos_dwmmc_bind(struct udevice *dev)
 {
        struct exynos_mmc_plat *plat = dev_get_platdata(dev);
-       int ret;
 
-       ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
-       if (ret)
-               return ret;
-
-       return 0;
+       return dwmci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
 static const struct udevice_id exynos_dwmmc_ids[] = {