aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChuanxiao.Dong <chuanxiao.dong@intel.com>2014-08-18 23:02:41 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 07:59:25 -0400
commitadc828556dfc3f87a5c1338fc5412cbec3c0b529 (patch)
treedf113f64da1ca50533795bc58850610f191d17e4 /drivers/mmc
parent312449efd16bb06a1e4fda94793d3eb8b8bb16f6 (diff)
mmc: sdhci: check 1.2v IO capability for SDHC host
Right now enable 1.2v IO voltage for SDHC is by using vqmmc. Thus for the host which doesn't have vqmmc, or its vqmmc does not support 1.2v, directly use MMC_CAP2_HS200 may cause HS200 failure. So needs to check if vqmmc is able to support 1.2v. If it does not support, disable 1.2v IO for HS200. Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 335cdf3b5224..7481bd863502 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3037,8 +3037,13 @@ int sdhci_add_host(struct sdhci_host *host)
3037 /* SD3.0: SDR104 is supported so (for eMMC) the caps2 3037 /* SD3.0: SDR104 is supported so (for eMMC) the caps2
3038 * field can be promoted to support HS200. 3038 * field can be promoted to support HS200.
3039 */ 3039 */
3040 if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_HS200)) 3040 if (!(host->quirks2 & SDHCI_QUIRK2_BROKEN_HS200)) {
3041 mmc->caps2 |= MMC_CAP2_HS200; 3041 mmc->caps2 |= MMC_CAP2_HS200;
3042 if (IS_ERR(mmc->supply.vqmmc) ||
3043 !regulator_is_supported_voltage
3044 (mmc->supply.vqmmc, 1100000, 1300000))
3045 mmc->caps2 &= ~MMC_CAP2_HS200_1_2V_SDR;
3046 }
3042 } else if (caps[1] & SDHCI_SUPPORT_SDR50) 3047 } else if (caps[1] & SDHCI_SUPPORT_SDR50)
3043 mmc->caps |= MMC_CAP_UHS_SDR50; 3048 mmc->caps |= MMC_CAP_UHS_SDR50;
3044 3049