From: Ryan QIAN Date: Tue, 7 Feb 2012 06:43:09 +0000 (+0800) Subject: ENGR00173939 [MX6Q]: Skip sending S18R on SD slots doesnt support 1.8V X-Git-Tag: v3.0.35-fsl~1556 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b8621fa04dbdef2cb5432eee120b404f5b24cf70;p=karo-tx-linux.git 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 --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 84ec6119abcd..e2dda501575d 100755 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -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)