aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-esdhc-imx.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2012-01-09 13:08:14 +0800
committerEric Miao <eric.miao@linaro.org>2012-01-09 20:42:55 +0800
commit2bb75d3fe1b99da89cb4d921841e2e99c7ad0055 (patch)
treef7b28192c82ce1b7c29e644549a8a16ca6db13b9 /drivers/mmc/host/sdhci-esdhc-imx.c
parentd514e4a6158e2ebfad3ccfa26607fad5b98909b9 (diff)
mmc: sdhci-esdhc-imx: support of 1.8V is board specifictopic/lt-3.2-imx6-sdhc
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-esdhc-imx.c')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c14
1 files changed, 14 insertions, 0 deletions
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;