aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-03-24 09:45:04 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2015-03-25 04:46:35 -0400
commit07bf2b54cd8555390cf5fced9471689ebf7fd56c (patch)
tree04cf9a0bfd91feebfb890daf89d955ea6a3c258d /drivers/mmc
parent9369c97cc7eca4a73baf382cfabe92ed20ea04ed (diff)
mmc: sdhci-esdhc-imx: support voltage-range property
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 9cce5cf18ebc..7ee831255f50 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
864#ifdef CONFIG_OF 864#ifdef CONFIG_OF
865static int 865static int
866sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, 866sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
867 struct sdhci_host *host,
867 struct esdhc_platform_data *boarddata) 868 struct esdhc_platform_data *boarddata)
868{ 869{
869 struct device_node *np = pdev->dev.of_node; 870 struct device_node *np = pdev->dev.of_node;
@@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
900 if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) 901 if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
901 boarddata->delay_line = 0; 902 boarddata->delay_line = 0;
902 903
904 mmc_of_parse_voltage(np, &host->ocr_mask);
905
903 return 0; 906 return 0;
904} 907}
905#else 908#else
906static inline int 909static inline int
907sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, 910sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
911 struct sdhci_host *host,
908 struct esdhc_platform_data *boarddata) 912 struct esdhc_platform_data *boarddata)
909{ 913{
910 return -ENODEV; 914 return -ENODEV;
@@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
999 host->ioaddr + ESDHC_TUNING_CTRL); 1003 host->ioaddr + ESDHC_TUNING_CTRL);
1000 1004
1001 boarddata = &imx_data->boarddata; 1005 boarddata = &imx_data->boarddata;
1002 if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) { 1006 if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
1003 if (!host->mmc->parent->platform_data) { 1007 if (!host->mmc->parent->platform_data) {
1004 dev_err(mmc_dev(host->mmc), "no board data!\n"); 1008 dev_err(mmc_dev(host->mmc), "no board data!\n");
1005 err = -EINVAL; 1009 err = -EINVAL;