]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/msm_sdhci.c
mmc: sdhci: Clear SDHCI_CLOCK_CONTROL before configuring the new value
[u-boot] / drivers / mmc / msm_sdhci.c
index 70a8d96eeef33d6c59d8723bef69fdd903256f72..1db683d01e695696e633727233c8d45af39f8465 100644 (file)
@@ -96,6 +96,8 @@ static int msm_sdc_probe(struct udevice *dev)
 
        host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_BROKEN_R1B;
 
+       host->max_clk = 0;
+
        /* Init clocks */
        ret = msm_sdc_clk_init(dev);
        if (ret)
@@ -140,12 +142,7 @@ static int msm_sdc_probe(struct udevice *dev)
                writel(caps, host->ioaddr + SDHCI_VENDOR_SPEC_CAPABILITIES0);
        }
 
-       /* Set host controller version */
-       host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
-
-       caps = sdhci_readl(host, SDHCI_CAPABILITIES);
-       ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width,
-                             caps, 0, 0, host->version, host->quirks, 0);
+       ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
        host->mmc = &plat->mmc;
        if (ret)
                return ret;
@@ -180,7 +177,8 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
        priv->base = (void *)fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
                                                              parent->of_offset,
                                                              dev->of_offset,
-                                                             "reg", 1, NULL);
+                                                             "reg", 1, NULL,
+                                                             false);
        if (priv->base == (void *)FDT_ADDR_T_NONE ||
            host->ioaddr == (void *)FDT_ADDR_T_NONE)
                return -EINVAL;
@@ -191,13 +189,8 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
 static int msm_sdc_bind(struct udevice *dev)
 {
        struct msm_sdhc_plat *plat = dev_get_platdata(dev);
-       int ret;
 
-       ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
-       if (ret)
-               return ret;
-
-       return 0;
+       return sdhci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
 static const struct udevice_id msm_mmc_ids[] = {