]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/rockchip_dw_mmc.c
dm: mmc: rockchip: Enable CONFIG_DM_MMC_OPS for all boards
[karo-tx-uboot.git] / drivers / mmc / rockchip_dw_mmc.c
index d41d60ce3582767b96cb874d51d59448e4377484..691a51557de4e89b41f3b975618fe6ba28a7c111 100644 (file)
@@ -66,9 +66,7 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
 
 static int rockchip_dwmmc_probe(struct udevice *dev)
 {
-#ifdef CONFIG_BLK
        struct rockchip_mmc_plat *plat = dev_get_platdata(dev);
-#endif
        struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
        struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);
        struct dwmci_host *host = &priv->host;
@@ -106,33 +104,24 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
                        return ret;
        }
 #endif
-#ifdef CONFIG_BLK
        dwmci_setup_cfg(&plat->cfg, dev->name, host->buswidth, host->caps,
                        minmax[1], minmax[0]);
        host->mmc = &plat->mmc;
-#else
-       ret = add_dwmci(host, minmax[1], minmax[0]);
-       if (ret)
-               return ret;
-
-#endif
        host->mmc->priv = &priv->host;
        host->mmc->dev = dev;
        upriv->mmc = host->mmc;
 
-       return 0;
+       return dwmci_probe(dev);
 }
 
 static int rockchip_dwmmc_bind(struct udevice *dev)
 {
-#ifdef CONFIG_BLK
        struct rockchip_mmc_plat *plat = dev_get_platdata(dev);
        int ret;
 
        ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);
        if (ret)
                return ret;
-#endif
 
        return 0;
 }
@@ -147,6 +136,7 @@ U_BOOT_DRIVER(rockchip_dwmmc_drv) = {
        .id             = UCLASS_MMC,
        .of_match       = rockchip_dwmmc_ids,
        .ofdata_to_platdata = rockchip_dwmmc_ofdata_to_platdata,
+       .ops            = &dm_dwmci_ops,
        .bind           = rockchip_dwmmc_bind,
        .probe          = rockchip_dwmmc_probe,
        .priv_auto_alloc_size = sizeof(struct rockchip_dwmmc_priv),