summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2019-09-11 12:15:30 +0200
committerMark Brown <broonie@kernel.org>2019-09-11 16:57:46 +0200
commit2b8279aec1829da4dc645e8731c28d2f5458d652 (patch)
tree2fe66ade86b3267c5455b6d6d691fc36d40888fd /sound/pci
parentspi: bcm2835: Speed up TX-only DMA transfers by clearing RX FIFO (diff)
downloadlinux-2b8279aec1829da4dc645e8731c28d2f5458d652.tar.xz
linux-2b8279aec1829da4dc645e8731c28d2f5458d652.zip
spi: bcm2835: Speed up RX-only DMA transfers by zero-filling TX FIFO
The BCM2835 SPI driver currently sets the SPI_CONTROLLER_MUST_TX flag. When performing an RX-only transfer, this flag causes the SPI core to allocate and DMA-map a dummy buffer which is copied to the TX FIFO. The dummy buffer is necessary because the chip is not capable of automatically clocking out null bytes. Avoid the overhead induced by the dummy buffer by preallocating a reusable DMA transaction which fills the TX FIFO by cyclically copying from the zero page. The transaction requires very little CPU time to submit and generates no interrupts while running. Specifics are provided in kerneldoc comments. [Nathan Chancellor contributed a DMA mapping fixup for an early version of this commit, hence his Signed-off-by.] Tested-by: Nuno Sá <nuno.sa@analog.com> Tested-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Martin Sperl <kernel@martin.sperl.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Link: https://lore.kernel.org/r/f45920af18dbf06e34129bbc406f53dc9c5d1075.1568187525.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/pci')
0 files changed, 0 insertions, 0 deletions