]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: invalidate block cache after hwpart switched successfully
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 27 Aug 2019 07:32:19 +0000 (15:32 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 30 Aug 2019 18:17:11 +0000 (14:17 -0400)
commitad7c61b8e28fb4ba839b815188e986acccfd333d
treea6c71d40113e1f2017d53decc19427ffdf249856
parent89f54b55a6a85bfbfb6d50f98c7e3bef58b1f95f
mmc: invalidate block cache after hwpart switched successfully

eMMC device has multiple hw partitions both address from zero. However the
mmc driver lacks block cache invalidation for switch hwpart. This causes a
problem that data of current hw partition is cached before switching to
another hw partition. And the following read operation of the latter hw
partition will get wrong data when reading from the addresses that have
been cached previously.

To solve this problem, invalidate block cache after a successful
mmc_switch_part() operation.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Felix Brack <fb@ltec.ch>
drivers/mmc/mmc-uclass.c