diff options
author | Marek Vasut <marex@denx.de> | 2020-05-22 18:19:08 +0200 |
---|---|---|
committer | Denys Drozdov <denys.drozdov@toradex.com> | 2021-01-08 19:42:09 +0200 |
commit | 23c18116ea1ffbc2ebdce9fc4501e89e1639fff3 (patch) | |
tree | 5700651467675b17ba4fe7827e74494bb63b7ebb | |
parent | 7e333dac7ced4e037f7fac3c0551324ecce391d9 (diff) |
mmc: fsl_esdhc: Fix SDR104 and HS200 support
The 3V3/1V8 switching could never have worked on any of the iMXes
ever since 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200"),
because that commit uses priv->vqmmc_dev when switching voltages on
mode switch, while local vqmmc_dev in probe to store the regulator
pointer. Those are two different variables with the same name. So
the priv->vqmmc_dev was always NULL and thus voltage switch between
modes never really suceeded.
Fix this by assigning priv->vqmmc_dev with value of the vqmmc_dev
in probe.
Fixes: 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
(cherry picked from commit 406df85345f942d9348443983d81a01e013e920b)
-rw-r--r-- | drivers/mmc/fsl_esdhc_imx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index ee24332a24..6971b2c44a 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1494,6 +1494,7 @@ static int fsl_esdhc_probe(struct udevice *dev) if (ret) { dev_dbg(dev, "no vqmmc-supply\n"); } else { + priv->vqmmc_dev = vqmmc_dev; ret = regulator_set_enable(vqmmc_dev, true); if (ret) { dev_err(dev, "fail to enable vqmmc-supply\n"); |