Skip to content
Commit 5603731a authored by Takeshi Saito's avatar Takeshi Saito Committed by Ulf Hansson
Browse files

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: default avatarTakeshi Saito <takeshi.saito.xv@renesas.com>
[wsa: use max_blk_count in if(), add Gen2, update commit message]
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Cc: stable@kernel.org
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
[Ulf: Fixed build error]
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5c27ff5d
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