mmc: renesas_sdhi: limit block count to 16 bit for old revisions
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 19 Mar 2019 10:12:59 +0000 (11:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 05:14:38 +0000 (14:14 +0900)
commit42f358b2d48c8abb0d71d9c56c3eed38f0fe5323
tree6a08b3a4467b5ce5c8401a8b3c86833b181f2a88
parent65a5c93687b7cc40e891cb478d9899079ee70453
mmc: renesas_sdhi: limit block count to 16 bit for old revisions

commit c9a9497ccef205ed4ed2e247011382627876d831 upstream.

R-Car Gen2 has two different SDHI incarnations in the same chip. The
older one does not support the recently introduced 32 bit register
access to the block count register. Make sure we use this feature only
after the first known version.

Thanks to the Renesas Testing team for this bug report!

Fixes: 5603731a15ef ("mmc: tmio: fix access width of Block Count Register")
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Tested-by: Phong Hoang <phong.hoang.wz@renesas.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/renesas_sdhi_core.c