]> git.baikalelectronics.ru Git - uboot.git/commit
sunxi: mmc: A20: Fix MMC optimisation
authorAndre Przywara <andre.przywara@arm.com>
Fri, 3 Sep 2021 15:49:16 +0000 (16:49 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 13 Sep 2021 23:02:10 +0000 (00:02 +0100)
commitf8c6efafcbe989a5c7185aff05bfcf53426dd693
treeee0b01aa26318e8488be0c22f63d4cfc1bf6b18e
parent817074e35657b9b08fac4c67042191e04d965ffa
sunxi: mmc: A20: Fix MMC optimisation

Some SoCs (as seen on A20) seem to misreport the MMC FIFO level if the
FIFO is completely full: the level size reads as zero, but the FIFO_FULL
bit is set. We won't do a single iteration of the read loop in this
case, so will be stuck forever.

Check for this situation and use a safe minimal FIFO size instead when
we hit this case.

This fixes MMC boot on A20 devices after the MMC FIFO optimisation
(418ae1f13027).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/sunxi_mmc.c