diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sd.c | 7 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index f2a05ea40f2..d426b0eb45f 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -740,11 +740,10 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr) ocr |= SD_OCR_CCS; /* - * If the host supports one of UHS-I modes, request the card - * to switch to 1.8V signaling level. + * If the host supports one of UHS-I modes, and support 1.8V VDD, + * request the card to switch to 1.8V signaling level. */ - if (host->caps & (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | - MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_DDR50)) + if ((host->caps & (MMC_CAP_UHS)) && (host->ocr_avail_sd & MMC_VDD_165_195)) ocr |= SD_OCR_S18R; /* If the host can supply more than 150mA, XPC should be set to 1. */ diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 7f6d6250679..4a2a9f674b4 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1,4 +1,5 @@ /* +#define MMC_CAP_UHS ( * Freescale eSDHC i.MX controller driver for the platform bus. * * derived from the OF-version. @@ -77,6 +78,7 @@ enum imx_esdhc_type { struct pltfm_imx_data { int flags; u32 scratchpad; + int can_vdd_180; /* support 1.8V? */ enum imx_esdhc_type devtype; struct esdhc_platform_data boarddata; }; @@ -462,6 +464,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, if (gpio_is_valid(boarddata->wp_gpio)) boarddata->wp_type = ESDHC_WP_GPIO; + if (of_get_property(np, "support-vdd-180", NULL)) + boarddata->vdd_180 = 1; return 0; } #else @@ -566,6 +570,16 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev) boarddata->wp_gpio = -EINVAL; } + /* The imx6q uSDHC capabilities will always claim to support 1.8V + * while this is board specific, should be initialized properly + */ + if (is_imx6q_usdhc(imx_data)) { + host->quirks |= SDHCI_QUIRK_MISSING_CAPS; + host->caps = readl(host->ioaddr + SDHCI_CAPABILITIES); + if (!boarddata->vdd_180) + host->caps &= ~SDHCI_CAN_VDD_180; + } + /* card_detect */ if (boarddata->cd_type != ESDHC_CD_GPIO) boarddata->cd_gpio = -EINVAL; |