summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRyan QIAN <b32804@freescale.com>2012-02-07 14:43:09 +0800
committerRyan QIAN <b32804@freescale.com>2012-02-07 14:43:09 +0800
commit05b7fdd4d6103500f1e531b3e5bd91d97f40ee34 (patch)
treeca9493133fc312993a9e11fbb2f6ea5fbf1ff52c /drivers/mmc
parent4a77281fc5b763f6e12ac1fd9b12ff68a9d91acc (diff)
ENGR00173939 [MX6Q]: Skip sending S18R on SD slots doesnt support 1.8V
- checking whether host support MMC_VDD_165_195, before query UHS mode supported by host controller. Signed-off-by: Ryan QIAN <b32804@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rwxr-xr-xdrivers/mmc/host/sdhci.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 394ddcd0936c..b1c24151d69d 100755
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2604,18 +2604,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)