mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
88d1555968
This patch fixes dcache-related problem. The problem manifested when dcache was enabled and the following command issued twice: mw 0x42000000 0 0x4000 ; sf probe ; sf read 0x42000000 0x0 0x10000 ; sha1sum 0x42000000 0x10000 The SHA1 checksum was correct during the first call. Yet with every subsequent call of the above command, it differed and was wrong. It turns out this was because of a race condition. On the first time the command was called, no cacheline contained any data from the destination memory location. The DMA transfered data into the location and the cache above the location was invalidated. Then the checksum was computed, but that meant the data were loaded into data cache. On any subsequent call, the DMA again transfered data into the same destination. Yet during the transfer, some of the DCache lines were evicted and written back into the main memory. Once the DMA transfer completed, the data cache was invalidated over the memory location as usual. But the data that were to be loaded back into the data cache by subsequent SHA1 checksuming were corrupted. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de> |
||
---|---|---|
.. | ||
altera_spi.c | ||
andes_spi.c | ||
andes_spi.h | ||
armada100_spi.c | ||
atmel_dataflash_spi.c | ||
atmel_spi.c | ||
atmel_spi.h | ||
bfin_spi.c | ||
cf_spi.c | ||
davinci_spi.c | ||
davinci_spi.h | ||
fsl_espi.c | ||
kirkwood_spi.c | ||
Makefile | ||
mpc8xxx_spi.c | ||
mpc52xx_spi.c | ||
mxc_spi.c | ||
mxs_spi.c | ||
oc_tiny_spi.c | ||
omap3_spi.c | ||
omap3_spi.h | ||
sh_spi.c | ||
sh_spi.h | ||
soft_spi.c | ||
tegra_spi.c | ||
xilinx_spi.c | ||
xilinx_spi.h |