]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00173939 [MX6Q]: Skip sending S18R on SD slots doesnt support 1.8V
authorRyan QIAN <b32804@freescale.com>
Tue, 7 Feb 2012 06:43:09 +0000 (14:43 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:54 +0000 (08:33 +0200)
- checking whether host support MMC_VDD_165_195, before query
UHS mode supported by host controller.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
drivers/mmc/host/sdhci.c

index 84ec6119abcd64b4808112ec1d8226f73932b41b..e2dda501575d013b2ce70e0e4d94550bb37ab154 100755 (executable)
@@ -2602,18 +2602,20 @@ int sdhci_add_host(struct sdhci_host *host)
            mmc_card_is_removable(mmc))
                mmc->caps |= MMC_CAP_NEEDS_POLL;
 
-       /* UHS-I mode(s) supported by the host controller. */
-       if (host->version >= SDHCI_SPEC_300)
-               mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
+       if (host->ocr_avail_sd & MMC_VDD_165_195) {
+               /* UHS-I mode(s) supported by the host controller. */
+               if (host->version >= SDHCI_SPEC_300)
+                       mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
 
-       /* SDR104 supports also implies SDR50 support */
-       if (caps[1] & SDHCI_SUPPORT_SDR104)
-               mmc->caps |= MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50;
-       else if (caps[1] & SDHCI_SUPPORT_SDR50)
-               mmc->caps |= MMC_CAP_UHS_SDR50;
+               /* SDR104 supports also implies SDR50 support */
+               if (caps[1] & SDHCI_SUPPORT_SDR104)
+                       mmc->caps |= MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50;
+               else if (caps[1] & SDHCI_SUPPORT_SDR50)
+                       mmc->caps |= MMC_CAP_UHS_SDR50;
 
-       if (caps[1] & SDHCI_SUPPORT_DDR50)
-               mmc->caps |= MMC_CAP_UHS_DDR50;
+               if (caps[1] & SDHCI_SUPPORT_DDR50)
+                       mmc->caps |= MMC_CAP_UHS_DDR50;
+       }
 
        /* Does the host needs tuning for SDR50? */
        if (caps[1] & SDHCI_USE_SDR50_TUNING)