summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2014-04-14 17:03:04 -0700
committerTroy Kisky <troy.kisky@boundarydevices.com>2014-04-24 18:59:55 -0700
commit2071bfa0f48bf9196ff34e4445f0c3a18e2f2c73 (patch)
treecc1288497256b76f9d81bbae336ceb4ecf962184 /drivers
parentfbf8ba87c9226f2377e1f8e67bec746c5752e182 (diff)
sdhci-esdhc-imx: add vqmmc-1-8-v property to stop regulator errors
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c5
-rw-r--r--drivers/mmc/host/sdhci.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index d2eb8911dc98..3c202e070aea 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -973,6 +973,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
else
boarddata->support_vsel = true;
+ if (of_find_property(np, "vqmmc-1-8-v", NULL))
+ boarddata->vqmmc_18v = true;
+
if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
boarddata->delay_line = 0;
@@ -1173,6 +1176,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
} else {
host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
}
+ if (boarddata->vqmmc_18v)
+ host->quirks2 |= SDHCI_QUIRK2_VQMMC_1_8_V;
if (host->mmc->pm_caps & MMC_PM_KEEP_POWER &&
host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index beb3fc94947b..829d91ff12ae 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1750,6 +1750,9 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+ if (host->quirks2 & SDHCI_QUIRK2_VQMMC_1_8_V)
+ ios->signal_voltage = MMC_SIGNAL_VOLTAGE_180;
+
switch (ios->signal_voltage) {
case MMC_SIGNAL_VOLTAGE_330:
/* Set 1.8V Signal Enable in the Host Control2 register to 0 */
@@ -1777,7 +1780,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
return -EAGAIN;
case MMC_SIGNAL_VOLTAGE_180:
- if (host->vqmmc) {
+ if (host->vqmmc && !(host->quirks2 & SDHCI_QUIRK2_VQMMC_1_8_V)) {
ret = regulator_set_voltage(host->vqmmc,
1700000, 1950000);
if (ret) {