]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/sdhci.c
mmc: sdhci: use the host version value in sdhci_setup_cfg
[people/ms/u-boot.git] / drivers / mmc / sdhci.c
index b2bf5a03fa84d9c1be6895bb0ef995cb5c7f6b94..73377227befbd9e53533124677eb72ca6e7d8763 100644 (file)
@@ -546,7 +546,11 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                return -EINVAL;
        }
 #endif
-       host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
+       if (host->quirks & SDHCI_QUIRK_REG32_RW)
+               host->version =
+                       sdhci_readl(host, SDHCI_HOST_VERSION - 2) >> 16;
+       else
+               host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
 
        cfg->name = host->name;
 #ifndef CONFIG_DM_MMC_OPS