On 1/11/21 11:29 PM, Jaehoon Chung wrote:

[...]

@@ -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);
        }
  }
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index 9062300c64..59d5a0e22e 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -90,6 +90,7 @@
  #define   TMIO_SD_VOLT_180            (2 << 0)/* 1.8V signal */
  #define TMIO_SD_DMA_MODE              0x410
  #define   TMIO_SD_DMA_MODE_DIR_RD     BIT(16) /* 1: from device, 0: to dev */
+#define   TMIO_SD_DMA_MODE_BUS_WIDTH   (BIT(5) | BIT(4)) /* RCar, 64bit */

Do those bit always set when machine is 64bit? or Can it be changed to other 
bus-width?
I don't have any knowledge on tmio side. Just wondering.

On R-Car3 they are always 2'b11 , i.e. 64bit, all other options are reserved.

Reply via email to