From: Marek Vasut Date: Tue, 12 Jan 2021 02:45:20 +0100 Subject: [PATCH] mmc: tmio: sdhi: Configure internal DMA bus width In-Reply-To: <0eac3e64-cd5f-2c0e-2c86-0e503a90e7d6@samsung.com> References: <20210111120852.5652-1-marek.vasut+renesas@gmail.com> <0eac3e64-cd5f-2c0e-2c86-0e503a90e7d6@samsung.com> Message-ID: <7a9fe8c0-e497-2d57-22cb-40a30117a2e6@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.