On Thu, Feb 21, 2019 at 08:38:05PM +0100, Wolfram Sang wrote: > From: Takeshi Saito <takeshi.saito.xv@xxxxxxxxxxx> > > 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@xxxxxxxxxxx> > [wsa: use max_blk_count in if(), add Gen2, update commit message] > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> > Cc: stable@xxxxxxxxxx Reviewed-by: Simon Horman <horms+renesas@xxxxxxxxxxxx>