linux_dsm_epyc7002/drivers/spi
Geert Uytterhoeven 5dd1ad23af spi: rspi: Only enable interrupts when there's a need to wait
rspi_wait_for_interrupt() unconditionally enables interrupts, even when the
wait condition is already satisfied. This causes a high interrupt load (2
interrupts/byte for full-duplex Single SPI transfers, 1 interrupt/byte for
RSPI with TX Only mode, or QSPI in unidirectional Dual or Quad Transfer
mode).

Change this to return immediately when the wait condition is satisfied.
This dramatically reduces the interrupt load, especially in high-speed
Quad Transfer mode, and increases transfer speed, as no interrupts need to
be handled when there's space available in the output FIFO, or data
available in the input FIFO.

Benchmark results for QSPI on r8a7791 while reading 1 MiB from 30 MHz SPI
FLASH on the Koelsch development board:

Before:
                        Single SPI      Dual SPI        Quad SPI
    Interrupts:         2096856         1048592         1048594
    Mbps:               0.9             1.6             1.6

After:

                        Single SPI      Dual SPI        Quad SPI
    Interrupts:         1048569         21295           8
    Mbps:               0.7             10.8            12.9

I don't know why Single SPI slowed down a bit.

I've also verified functionality for RSPI-RZ on r7s72100, but don't have
benchmark results as there's no SPI FLASH connected to RSPI on the Genmai
development board. Unlike RSPI and QSPI, RSPI-RZ has separate interrupts
for RX and TX, which shows that Single SPI transfers now generate (mostly)
RX interrupts, as expected.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-04 11:11:46 +00:00
..
Kconfig Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qspi', 'spi/topic/s3c24xx', 'spi/topic/s3c64xx', 'spi/topic/sh', 'spi/topic/tegra114', 'spi/topic/tegra20-sflash', 'spi/topic/tegra20-slink', 'spi/topic/txx9' and 'spi/topic/xcomm' into spi-linus 2014-01-23 13:07:14 +00:00
Makefile spi: bcm63xx-hsspi: add bcm63xx HSSPI driver 2013-12-04 13:29:13 +00:00
spi-altera.c spi: altera: Remove unneeded NULL checking for hw->bitbang.master 2014-01-13 10:12:45 +00:00
spi-ath79.c spi: ath79: Use devm_*() functions 2013-12-17 22:53:36 +00:00
spi-atmel.c spi: atmel: Refactor spi-atmel to use SPI framework queue 2014-01-09 17:41:23 +00:00
spi-au1550.c Merge remote-tracking branch 'spi/topic/probe' into spi-next 2013-10-25 09:51:36 +01:00
spi-bcm63xx-hsspi.c spi/bcm63xx-hsspi: fix pm sleep support 2013-12-17 22:32:17 +00:00
spi-bcm63xx.c Merge remote-tracking branches 'spi/topic/bcm2835', 'spi/topic/bcm63xx', 'spi/topic/bcm63xx-hsspi', 'spi/topic/bitbang', 'spi/topic/bpw', 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/davinci', 'spi/topic/dw' and 'spi/topic/falcon' into spi-linus 2014-01-23 13:07:05 +00:00
spi-bcm2835.c spi: bcm2835: Use devm_request_irq() 2013-12-17 22:58:18 +00:00
spi-bfin5xx.c Merge remote-tracking branch 'spi/topic/bfin' into spi-next 2013-10-25 09:51:21 +01:00
spi-bfin-sport.c Merge remote-tracking branch 'spi/topic/bfin' into spi-next 2013-10-25 09:51:21 +01:00
spi-bfin-v3.c spi: bfin-v3: use devm_spi_register_master() 2013-09-26 11:42:23 +01:00
spi-bitbang-txrx.h spi: bitbang: Grammar s/make to make/to make/ 2014-01-13 11:24:21 +00:00
spi-bitbang.c spi: bitbang: Fix checkpatch issue 2013-10-14 18:23:48 +01:00
spi-butterfly.c Merge remote-tracking branch 'spi/topic/butterfly' into spi-next 2013-10-25 09:51:23 +01:00
spi-clps711x.c spi: clps711x: Add MODULE_ALIAS to support module auto-loading 2014-01-14 14:21:43 +00:00
spi-coldfire-qspi.c spi: coldfire-qspi: remove redundant return value check of platform_get_resource() 2013-12-09 17:04:56 +00:00
spi-davinci.c Merge remote-tracking branches 'spi/topic/bcm2835', 'spi/topic/bcm63xx', 'spi/topic/bcm63xx-hsspi', 'spi/topic/bitbang', 'spi/topic/bpw', 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/davinci', 'spi/topic/dw' and 'spi/topic/falcon' into spi-linus 2014-01-23 13:07:05 +00:00
spi-dw-mid.c dmaengine: remove DMA unmap flags 2013-11-14 11:04:38 -08:00
spi-dw-mmio.c spi: dw-mmio: prepare the clock before enabling 2013-12-31 12:30:22 +00:00
spi-dw-pci.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-dw.c spi: dw: fix memory leak on error path 2013-12-31 12:30:25 +00:00
spi-dw.h spi: dw: use managed resources 2013-12-31 12:30:18 +00:00
spi-efm32.c spi: efm32: drop unused struct and fix size check 2013-10-09 12:00:42 +01:00
spi-ep93xx.c Merge remote-tracking branch 'spi/topic/bfin' into spi-next 2013-10-25 09:51:21 +01:00
spi-falcon.c spi: falcon: Use devm_spi_register_master() 2013-12-04 12:54:52 +00:00
spi-fsl-cpm.c DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09: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-dspi.c Merge remote-tracking branches 'spi/topic/bcm2835', 'spi/topic/bcm63xx', 'spi/topic/bcm63xx-hsspi', 'spi/topic/bitbang', 'spi/topic/bpw', 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/davinci', 'spi/topic/dw' and 'spi/topic/falcon' into spi-linus 2014-01-23 13:07:05 +00:00
spi-fsl-espi.c spi/fsl-espi: Add Power Management support for eSPI controller 2013-12-12 11:50:02 +00:00
spi-fsl-lib.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +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 tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09: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: spi-gpio: Use 'cansleep' variants to access GPIO 2013-11-24 14:12:36 +00:00
spi-imx.c spi: spi-imx: Fix out-of-order CS/SCLK operation at low speeds 2013-12-20 11:53:57 +00:00
spi-lm70llp.c spi: bitbang: Let spi_bitbang_start() take a reference to master 2013-10-07 14:50:43 +01:00
spi-mpc52xx-psc.c spi: Don't break user-visible strings to multiple source lines in drivers 2013-10-16 19:07:15 +01:00
spi-mpc52xx.c spi: use platform_{get,set}_drvdata() 2013-05-23 09:09:55 -05:00
spi-mpc512x-psc.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-mxs.c spi: Remove duplicate code to set default bits_per_word setting 2014-01-17 15:54:22 +00:00
spi-nuc900.c spi: nuc900: remove redundant return value check of platform_get_resource() 2013-12-20 12:34:44 +00:00
spi-oc-tiny.c spi: oc-tiny: Simplify tiny_spi_txrx_bufs implementation when irq is not used 2014-01-09 17:58:28 +00:00
spi-octeon.c spi: octeon: use devm_spi_register_master() 2013-09-26 11:42:34 +01:00
spi-omap2-mcspi.c spi: omap2-mcspi: raw read and write endian fix 2013-11-24 14:06:45 +00:00
spi-omap-100k.c spi: omap-100k: remove pointless _remove function 2013-12-02 17:35:54 +00:00
spi-omap-uwire.c spi: spi-omap-uwire: replace platform_driver_probe to support deferred probing 2013-10-09 12:07:50 +01:00
spi-orion.c spi: orion: Use devm_clk_get() 2013-12-09 17:31:38 +00:00
spi-pl022.c Merge remote-tracking branch 'spi/topic/pl022' into spi-next 2013-10-25 09:51:35 +01:00
spi-ppc4xx.c DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
spi-pxa2xx-dma.c Merge remote-tracking branch 'spi/topic/pxa' into spi-next 2013-06-26 16:21:03 +01:00
spi-pxa2xx-pci.c spi: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-03 18:03:26 +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 Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qspi', 'spi/topic/s3c24xx', 'spi/topic/s3c64xx', 'spi/topic/sh', 'spi/topic/tegra114', 'spi/topic/tegra20-sflash', 'spi/topic/tegra20-slink', 'spi/topic/txx9' and 'spi/topic/xcomm' into spi-linus 2014-01-23 13:07:14 +00: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: rspi: Only enable interrupts when there's a need to wait 2014-02-04 11:11:46 +00:00
spi-s3c24xx-fiq.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx-fiq.S spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx.c spi: s3c24xx: Remove reference to plat/fiq.h 2014-01-08 13:06:21 +00:00
spi-s3c64xx.c spi/s3c64xx: Correct indentation 2014-01-13 11:30:41 +00:00
spi-sc18is602.c Merge commit 'spi/topic/sc18is602' into spi-linus 2014-01-23 13:14:15 +00:00
spi-sh-hspi.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-sh-msiof.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-sh-sci.c spi: bitbang: Let spi_bitbang_start() take a reference to master 2013-10-07 14:50:43 +01:00
spi-sh.c Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qspi', 'spi/topic/s3c24xx', 'spi/topic/s3c64xx', 'spi/topic/sh', 'spi/topic/tegra114', 'spi/topic/tegra20-sflash', 'spi/topic/tegra20-slink', 'spi/topic/txx9' and 'spi/topic/xcomm' into spi-linus 2014-01-23 13:07:14 +00:00
spi-sirf.c spi: Remove duplicate code to set default bits_per_word setting 2014-01-17 15:54:22 +00:00
spi-tegra20-sflash.c spi: tegra20-sflash: use u32 for 32-bit register values 2013-12-09 18:14:03 +00:00
spi-tegra20-slink.c spi: tegra20-slink: use u32 for 32-bit register values 2013-12-09 18:13:28 +00:00
spi-tegra114.c spi: tegra114: use u32 for 32-bit register values 2013-12-09 18:12:54 +00:00
spi-ti-qspi.c Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qspi', 'spi/topic/s3c24xx', 'spi/topic/s3c64xx', 'spi/topic/sh', 'spi/topic/tegra114', 'spi/topic/tegra20-sflash', 'spi/topic/tegra20-slink', 'spi/topic/txx9' and 'spi/topic/xcomm' into spi-linus 2014-01-23 13:07:14 +00:00
spi-ti-ssp.c spi: use dev_get_platdata() 2013-08-29 13:56:23 +01:00
spi-tle62x0.c Merge remote-tracking branch 'spi/topic/tel62x0' into spi-next 2013-09-01 13:49:14 +01:00
spi-topcliff-pch.c Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
spi-txx9.c Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qspi', 'spi/topic/s3c24xx', 'spi/topic/s3c64xx', 'spi/topic/sh', 'spi/topic/tegra114', 'spi/topic/tegra20-sflash', 'spi/topic/tegra20-slink', 'spi/topic/txx9' and 'spi/topic/xcomm' into spi-linus 2014-01-23 13:07:14 +00:00
spi-xcomm.c spi: xcomm: Use devm_spi_register_master() 2013-12-04 12:52:30 +00:00
spi-xilinx.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
spi.c Merge remote-tracking branch 'spi/topic/core' into spi-linus 2014-01-23 13:07:01 +00:00
spidev.c spi: spidev: Fix checkpatch issue 2013-10-15 13:15:52 +01:00