u-boot-brain/drivers/spi
Marek Vasut 88d1555968 MX28: SPI: Fix the DMA DCache race condition
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>
2012-09-06 14:17:55 +02:00
..
altera_spi.c altera_spi: add spi_set_speed 2011-02-08 08:29:53 -05:00
andes_spi.c andes_spi: add andes_spi interface 2011-07-25 23:40:11 +02:00
andes_spi.h andes_spi: add andes_spi interface 2011-07-25 23:40:11 +02:00
armada100_spi.c SPI: Add SPI driver support for Marvell Armada100 2011-10-27 21:56:32 +02:00
atmel_dataflash_spi.c AT91/SPI: fix atmel_dataflash_spi.c to allow building without warnings 2011-08-03 13:00:56 +02:00
atmel_spi.c spi: atmel: add WDRBT bit to avoid receive overrun 2012-09-01 17:06:14 +02:00
atmel_spi.h spi: atmel: add WDRBT bit to avoid receive overrun 2012-09-01 17:06:14 +02:00
bfin_spi.c Blackfin: bfin_spi: fix build error when DEBUG is defined 2011-10-16 14:22:19 -04:00
cf_spi.c add CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmc 2011-04-13 06:35:22 -05:00
davinci_spi.c Davinci: SPI: add the missing v2 patch changes 2010-07-05 20:00:40 -04:00
davinci_spi.h TI DaVinci: Driver for the davinci SPI controller 2010-02-12 12:31:53 -06:00
fsl_espi.c GCC4.6: Squash warnings in fsl_espi.c 2011-10-27 23:54:05 +02:00
kirkwood_spi.c kw_spi: fix clock prescaler computation 2012-09-03 17:28:51 +05:30
Makefile spi: Fix merge conflicts - Makefile 2012-08-07 23:08:14 +02:00
mpc8xxx_spi.c Move arch/ppc to arch/powerpc 2010-04-21 23:42:38 +02:00
mpc52xx_spi.c mpc52xx: Add SPI driver. 2009-06-14 23:01:38 +02:00
mxc_spi.c spi: fix mxc_spi_slave structure allocation to clear memory 2012-09-01 14:58:27 +02:00
mxs_spi.c MX28: SPI: Fix the DMA DCache race condition 2012-09-06 14:17:55 +02:00
oc_tiny_spi.c spi: add new driver for OpenCores tiny_spi 2011-04-30 20:58:36 +02:00
omap3_spi.c am335x evm: Enable support for spi0 2012-09-01 14:58:19 +02:00
omap3_spi.h am33xx: Add support, update omap3 McSPI driver 2012-09-01 14:58:18 +02:00
sh_spi.c sh_spi: Add 4 chip select signals supporting 2012-03-26 10:09:31 +09:00
sh_spi.h sh_spi: Add 4 chip select signals supporting 2012-03-26 10:09:31 +09:00
soft_spi.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
tegra_spi.c tegra20: rename tegra2 -> tegra20 2012-09-01 14:58:21 +02:00
xilinx_spi.c spi: microblaze: Adds driver for Xilinx SPI controller 2012-07-31 07:14:04 +02:00
xilinx_spi.h spi: microblaze: Adds driver for Xilinx SPI controller 2012-07-31 07:14:04 +02:00