summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/renesas_sdhi_sys_dmac.c
diff options
context:
space:
mode:
authorTakeshi Saito <takeshi.saito.xv@renesas.com>2019-02-21 22:38:05 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2019-02-26 12:01:49 +0300
commit5603731a15ef9ca317c122cc8c959f1dee1798b4 (patch)
treeccfd515046ddb145f736fefb3fe2e39a00259766 /drivers/mmc/host/renesas_sdhi_sys_dmac.c
parent5c27ff5db1491a947264d6d4e4cbe43ae6535bae (diff)
downloadlinux-5603731a15ef9ca317c122cc8c959f1dee1798b4.tar.xz
mmc: tmio: fix access width of Block Count Register
In R-Car Gen2 or later, the maximum number of transfer blocks are changed from 0xFFFF to 0xFFFFFFFF. Therefore, Block Count Register should use iowrite32(). If another system (U-boot, Hypervisor OS, etc) uses bit[31:16], this value will not be cleared. So, SD/MMC card initialization fails. So, check for the bigger register and use apropriate write. Also, mark the register as extended on Gen2. Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com> [wsa: use max_blk_count in if(), add Gen2, update commit message] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: stable@kernel.org Reviewed-by: Simon Horman <horms+renesas@verge.net.au> [Ulf: Fixed build error] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/renesas_sdhi_sys_dmac.c')
-rw-r--r--drivers/mmc/host/renesas_sdhi_sys_dmac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index 8471160316e0..02cd878e209f 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -65,6 +65,7 @@ static const struct renesas_sdhi_of_data of_rcar_gen2_compatible = {
.scc_offset = 0x0300,
.taps = rcar_gen2_scc_taps,
.taps_num = ARRAY_SIZE(rcar_gen2_scc_taps),
+ .max_blk_count = 0xffffffff,
};
/* Definitions for sampling clocks */