]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: matsushita-common: Always check controller version
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sat, 23 Sep 2017 11:01:20 +0000 (13:01 +0200)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Wed, 11 Apr 2018 21:11:59 +0000 (23:11 +0200)
Handle the controller version even if quirks are set. The controller in
Renesas Gen3 SoCs does provide the version register, which indicates a
controller v10 and the controller does support internal DMA and /1024
divider.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mmc/matsushita-common.c

index 377f349b41a36f1108b42a55801f81b8c91bfe49..d5facd972fbf596615c6065bda4b4524e50ae314 100644 (file)
@@ -722,16 +722,15 @@ int matsu_sd_probe(struct udevice *dev, u32 quirks)
        plat->cfg.name = dev->name;
        plat->cfg.host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
 
-       if (quirks) {
+       if (quirks)
                priv->caps = quirks;
-       } else {
-               priv->version = matsu_sd_readl(priv, MATSU_SD_VERSION) &
-                                                       MATSU_SD_VERSION_IP;
-               dev_dbg(dev, "version %x\n", priv->version);
-               if (priv->version >= 0x10) {
-                       priv->caps |= MATSU_SD_CAP_DMA_INTERNAL;
-                       priv->caps |= MATSU_SD_CAP_DIV1024;
-               }
+
+       priv->version = matsu_sd_readl(priv, MATSU_SD_VERSION) &
+                                               MATSU_SD_VERSION_IP;
+       dev_dbg(dev, "version %x\n", priv->version);
+       if (priv->version >= 0x10) {
+               priv->caps |= MATSU_SD_CAP_DMA_INTERNAL;
+               priv->caps |= MATSU_SD_CAP_DIV1024;
        }
 
        if (fdt_get_property(gd->fdt_blob, dev_of_offset(dev), "non-removable",