summaryrefslogtreecommitdiff
path: root/drivers/mmc/tmio-common.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2021-01-03 13:38:25 +0300
committerMarek Vasut <marek.vasut+renesas@gmail.com>2021-01-31 16:08:45 +0300
commit8a73bef338d48095dfb8e805b643d7dd1f6b6d9b (patch)
treeb1ca7e13bb2c77474b8b76c37e9e783b620278c6 /drivers/mmc/tmio-common.c
parent32568ee5b9f0fc35ecb12f62cfd67395ac792781 (diff)
downloadu-boot-8a73bef338d48095dfb8e805b643d7dd1f6b6d9b.tar.xz
mmc: tmio: sdhi: Configure internal DMA bus width
The R-Car3 SDHI should set these two bits in DMA_MODE register according to the specification, to indicate 64bit bus width. No other bus width options are permitted and the default value is 0, which is incorrect. Set the bits accordingly. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Diffstat (limited to 'drivers/mmc/tmio-common.c')
-rw-r--r--drivers/mmc/tmio-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 2c528689bd..6c0c840bbb 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -324,6 +324,8 @@ static int tmio_sd_dma_xfer(struct udevice *dev, struct mmc_data *data)
tmp = tmio_sd_readl(priv, TMIO_SD_DMA_MODE);
+ tmp |= priv->idma_bus_width;
+
if (data->flags & MMC_DATA_READ) {
buf = data->dest;
dir = DMA_FROM_DEVICE;
@@ -702,6 +704,7 @@ static void tmio_sd_host_init(struct tmio_sd_priv *priv)
if (priv->caps & TMIO_SD_CAP_DMA_INTERNAL) {
tmp = tmio_sd_readl(priv, TMIO_SD_DMA_MODE);
tmp |= TMIO_SD_DMA_MODE_ADDR_INC;
+ tmp |= priv->idma_bus_width;
tmio_sd_writel(priv, tmp, TMIO_SD_DMA_MODE);
}
}