summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2022-02-01 01:08:31 +0300
committerJaehoon Chung <jh80.chung@samsung.com>2022-02-09 02:33:28 +0300
commit14448e9c97f06717cac95888329ab7cf31929050 (patch)
tree46814f77efed7ce7c4c1919009aaf613fe802228 /drivers/mmc
parent1d4b3b2fcb8584a531626684782778cd792f072f (diff)
downloadu-boot-14448e9c97f06717cac95888329ab7cf31929050.tar.xz
mmc: fsl_esdhc_imx: fix watermark level in dma
Seems that we need the waterlevel setting not only for PIO mode as without this at least the i.MX 8M Mini won't boot anymore when being written by such a U-Boot. Corruption has also been observed both on the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix this by setting the watermark level again regardless of whether in DMA or PIO mode. Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()") Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Tested-by: Fabio Estevam <festevam@gmail.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 9299635f50..efa5ed0af7 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -336,9 +336,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
}
}
- if (IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
- esdhc_setup_watermark_level(priv, data);
- else
+ esdhc_setup_watermark_level(priv, data);
+ if (!IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
esdhc_setup_dma(priv, data);
/* Calculate the timeout period for data transactions */