u-boot/drivers/spi
Rajeshwari Shinde 120af1572a spi: exynos: Minimise access to SPI FIFO level
Accessing SPI registers is slow, but access to the FIFO level register
in particular seems to be extraordinarily expensive (I measure up to
600ns). Perhaps it is required to synchronise with the SPI byte output
logic which might run at 1/8th of the 40MHz SPI speed (just a guess).

Reduce access to this register by filling up and emptying FIFOs
more completely, rather than just one word each time around the inner
loop.

Since the rxfifo value will now likely be much greater that what we read
before we fill the txfifo, we only fill the txfifo halfway. This is
because if the txfifo is empty, but the rxfifo has data in it, then writing
too much data to the txfifo may overflow the rxfifo as data arrives.

This speeds up SPI flash reading from about 1MB/s to about 2MB/s on snow.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2013-10-08 18:18:11 +05:30
..
Makefile spi: add TI QSPI driver 2013-10-07 17:55:51 +05:30
altera_spi.c spi: Use spi_alloc_slave() in each SPI driver 2013-03-19 08:45:36 -07:00
andes_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
andes_spi.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
armada100_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
atmel_dataflash_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
atmel_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
atmel_spi.h spi: atmel_spi: using ip version to check whether has wdrbt 2013-05-12 16:36:11 +02:00
bfin_spi.c spi: bfin_spi: Use DIV_ROUND_UP instead of open-coded 2013-07-31 16:56:04 +08:00
bfin_spi6xx.c spi: Use spi_alloc_slave() in each SPI driver 2013-03-19 08:45:36 -07:00
cf_qspi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cf_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
davinci_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
davinci_spi.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
exynos_spi.c spi: exynos: Minimise access to SPI FIFO level 2013-10-08 18:18:11 +05:30
fdt_spi.c tegra114: add SPI driver 2013-03-25 09:56:07 -07:00
fsl_espi.c powerpc: Fix CamelCase checkpatch warnings 2013-08-20 09:57:51 -07:00
ich.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ich.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
kirkwood_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mpc8xxx_spi.c spi: mpc8xxx_spi: Use DIV_ROUND_UP instead of open-coded 2013-08-06 23:58:24 +05:30
mpc52xx_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mxc_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mxs_spi.c spi: mxs_spi: Configure chipselect after block reset 2013-08-27 19:39:39 +05:30
oc_tiny_spi.c spi: Use spi_alloc_slave() in each SPI driver 2013-03-19 08:45:36 -07:00
omap3_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap3_spi.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sh_spi.c spi: Use spi_alloc_slave() in each SPI driver 2013-03-19 08:45:36 -07:00
sh_spi.h sh_spi: Add 4 chip select signals supporting 2012-03-26 10:09:31 +09:00
soft_spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
spi.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tegra20_sflash.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tegra20_slink.c Merge branch 'u-boot/master' into 'u-boot-arm/master' 2013-03-28 18:50:01 +01:00
tegra114_spi.c spi: tegra114_spi: Convert to use spi_alloc_slave() 2013-06-13 22:55:24 +05:30
ti_qspi.c spi: add TI QSPI driver 2013-10-07 17:55:51 +05:30
xilinx_spi.c spi: Use spi_alloc_slave() in each SPI driver 2013-03-19 08:45:36 -07:00
xilinx_spi.h spi: xilinx_spi: Perform software reset during slave setup 2013-02-04 12:09:49 +01:00
zynq_spi.c spi: Add zynq spi controller driver 2013-08-07 01:09:47 +05:30