Commit 41279f01 authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson

mmc: sdhi: use maximum width for the sdbuf register

Make use of the 64 bit sdbuf width on Renesas R-Car Gen3. If the
registers are 8 byte apart, the width is also 64 bit. For all others,
the width is 32 bit, even if the registers are only 16 bit apart.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c7825151
...@@ -460,10 +460,11 @@ static int renesas_sdhi_multi_io_quirk(struct mmc_card *card, ...@@ -460,10 +460,11 @@ static int renesas_sdhi_multi_io_quirk(struct mmc_card *card,
static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable) static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable)
{ {
sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0); /* Iff regs are 8 byte apart, sdbuf is 64 bit. Otherwise always 32. */
int width = (host->bus_shift == 2) ? 64 : 32;
/* enable 32bit access if DMA mode if possibile */ sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0);
renesas_sdhi_sdbuf_width(host, enable ? 32 : 16); renesas_sdhi_sdbuf_width(host, enable ? width : 16);
} }
int renesas_sdhi_probe(struct platform_device *pdev, int renesas_sdhi_probe(struct platform_device *pdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment