WSL2-Linux-Kernel/drivers/spi
Gerhard Sittig 5df24ea63d spi: mpc512x: improve throughput in the RX/TX func
change the MPC512x SPI controller's transmission routine to increase
throughput: allow the RX byte counter to "lag behind" the TX byte
counter while iterating over the transfer's data, only wait for the
remaining RX bytes at the very end of the transfer

this approach eliminates delays in the milliseconds range, transfer
times for e.g. 16MB of SPI flash data dropped from 31s to 9s, correct
operation was tested by continuously transferring and comparing data
from an SPI flash (more than 200GB in some 45 hours)

background information on the motivation:

one might assume that all the RX data should have been received when the
TX data was sent, given the fact that we are the SPI master and provide
all of the clock, but in practise there's a difference

the ISR is triggered when the TX FIFO became empty, while transmission
of the last item still occurs (from the TX hold and shift registers),
sampling RX data on the opposite clock edge compared to the TX data adds
another delay (half a bit period), and RX data needs to propagate from
the reception buffer to the RX FIFO depending on the specific SoC
implementation

to cut it short: a difference between TX and RX byte counters during
transmission is not just acceptable but should be considered the regular
case, only the very end of the transfer needs to make sure that all of
the RX data was received before deasserting the chip select and telling
the caller that transmission has completed

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-04 18:22:47 +01:00
..
Kconfig Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
Makefile spi/tegra114: add spi driver 2013-04-07 10:08:00 +01:00
spi-altera.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-ath79.c spi/ath79: add shutdown handler 2013-02-06 10:41:12 +00:00
spi-atmel.c Merge remote-tracking branch 'spi/fix/grant' into spi-linus 2013-05-13 18:27:18 +04:00
spi-au1550.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-bcm63xx.c spi/bcm63xx: remove unused speed_hz variable 2013-04-08 13:42:10 +01:00
spi-bcm2835.c spi: bcm2835: make use of new bits_per_word_mask core feature 2013-04-01 14:14:33 +01:00
spi-bfin-sport.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-bfin5xx.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-bitbang-txrx.h
spi-bitbang.c Merge branch 'broonie/spi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git 2013-02-05 12:30:13 +00:00
spi-butterfly.c
spi-clps711x.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-coldfire-qspi.c spi: remove check for bits_per_word on transfer from low level driver 2013-02-05 12:26:59 +00:00
spi-davinci.c Merge remote-tracking branch 'spi/fix/grant' into spi-linus 2013-05-13 18:27:18 +04:00
spi-dw-mid.c
spi-dw-mmio.c
spi-dw-pci.c
spi-dw.c
spi-dw.h
spi-ep93xx.c Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
spi-falcon.c spi/mips-lantiq: set SPI_MASTER_HALF_DUPLEX flag 2013-02-05 17:16:55 +00:00
spi-fsl-cpm.c spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-cpm.h spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-espi.c
spi-fsl-lib.c spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-lib.h spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores 2013-04-07 10:07:57 +01:00
spi-fsl-spi.c spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores 2013-04-07 10:07:57 +01:00
spi-fsl-spi.h spi/spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC 2013-04-07 10:07:56 +01:00
spi-gpio.c spi-gpio: init CS before spi_bitbang_setup() 2013-04-10 14:47:09 +01:00
spi-imx.c spi/imx: Add MODULE_ALIAS() 2013-02-05 13:17:12 +00:00
spi-lm70llp.c
spi-mpc52xx-psc.c
spi-mpc52xx.c
spi-mpc512x-psc.c spi: mpc512x: improve throughput in the RX/TX func 2013-06-04 18:22:47 +01:00
spi-mxs.c ARM: arm-soc device tree changes, part 2 2013-05-07 11:06:17 -07:00
spi-nuc900.c
spi-oc-tiny.c spi: spi-oc-tiny: Use of_match_ptr() macro 2013-04-01 14:27:09 +01:00
spi-octeon.c
spi-omap-100k.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-omap-uwire.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-omap2-mcspi.c spi: omap2-mcspi: fix error return code in omap2_mcspi_probe() 2013-04-18 12:04:55 +01:00
spi-orion.c spi/orion: Use module_platform_driver() 2013-02-05 14:44:14 +00:00
spi-pl022.c spi: pl022: use generic DMA slave configuration if possible 2013-03-12 17:56:08 +01:00
spi-ppc4xx.c Device tree changes for v3.9 2013-02-20 11:04:46 -08:00
spi-pxa2xx-dma.c spi/pxa2xx: add support for DMA engine 2013-02-08 12:15:28 +00:00
spi-pxa2xx-pci.c spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions() 2013-03-12 18:30:56 +00:00
spi-pxa2xx-pxadma.c spi/pxa2xx: break out the private DMA API usage into a separate file 2013-02-08 12:15:21 +00:00
spi-pxa2xx.c spi: Updates for v3.10 2013-04-29 16:38:41 -07:00
spi-pxa2xx.h spi/pxa2xx: add support for Intel Low Power Subsystem SPI 2013-02-08 13:14:40 +00:00
spi-rspi.c
spi-s3c24xx-fiq.S
spi-s3c24xx-fiq.h
spi-s3c24xx.c
spi-s3c64xx.c spi/s3c64xx: Check for errors in dmaengine prepare_transfer() 2013-04-18 18:17:27 +01:00
spi-sc18is602.c
spi-sh-hspi.c
spi-sh-msiof.c spi: spi-sh-msiof: Use of_match_ptr() macro 2013-04-01 14:27:14 +01:00
spi-sh-sci.c
spi-sh.c
spi-sirf.c spi/sirf: fix MODULE_DEVICE_TABLE 2013-04-23 19:27:00 +01:00
spi-tegra20-sflash.c drivers/spi: don't check resource with devm_ioremap_resource 2013-05-18 11:57:24 +02:00
spi-tegra20-slink.c spi: tegra: slink: make local symbols static 2013-04-08 13:41:34 +01:00
spi-tegra114.c spi/tegra114: add spi driver 2013-04-07 10:08:00 +01:00
spi-ti-ssp.c
spi-tle62x0.c
spi-topcliff-pch.c spi-topcliff-pch: fix to use list_for_each_entry_safe() when delete list items 2013-04-28 02:18:13 +01:00
spi-txx9.c spi: Remove erroneous __init, __exit and __exit_p() references in drivers 2013-02-05 14:43:16 +00:00
spi-xcomm.c
spi-xilinx.c
spi.c Merge remote-tracking branch 'spi/fix/grant' into spi-linus 2013-05-13 18:27:18 +04:00
spidev.c spi/spidev: Use PTR_RET function 2013-04-01 14:32:32 +01:00