Skip to content

Raspberry Pi spi0 improvements

Lukas Wunner linux-spi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7spi: bcm2835: Avoid finishing transfer prematurely in IRQ modedrivers/spi/spi-bcm2835.c+1 -20 replies
2/7spi: bcm2835: Fix book-keeping of DMA terminationdrivers/spi/spi-bcm2835.c+1 -00 replies
3/7spi: bcm2835: Fix race on DMA terminationdrivers/spi/spi-bcm2835.c+4 -60 replies
4/7spi: bcm2835: Drop unused code for native Chip Selectdrivers/spi/spi-bcm2835.c+13 -831 reply
5/7spi: bcm2835: Document struct bcm2835_spidrivers/spi/spi-bcm2835.c+11 -00 replies
6/7spi: bcm2835: Overcome sglist entry length limitationdrivers/spi/spi-bcm2835.c+242 -491 reply
7/7spi: bcm2835: Speed up FIFO access if fill level is knowndrivers/spi/spi-bcm2835.c+62 -45 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMartin Sperl
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Raspberry Pi spi0 improvements

Here's a first batch of improvements for the spi0 master on the Raspberry Pi. The meat of the series is in its last two patches:

* Patch [6/7] allows DMA for transfer buffers starting at an offset not a multiple of 4. This overcomes a limitation affecting Ethernet drivers such as ks8851 which call netdev_alloc_skb_ip_align() to allocate deliberately unaligned receive buffers.

* Patch [7/7] speeds up PIO transfers by not polling the RX FIFO when it is known to contain data, or the TX FIFO when it is known to have free space.

The preceding patches fix rarely encountered bugs, remove obsolete code and add documentation.

The series has been tested extensively on the "Revolution Pi" family of open source PLCs (https://revolution.kunbus.com/), but further testing would be welcome to raise the confidence.

Thanks,

Lukas

Lukas Wunner (7):
spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode
spi: bcm2835: Fix book-keeping of DMA termination
spi: bcm2835: Fix race on DMA termination
spi: bcm2835: Drop unused code for native Chip Select
spi: bcm2835: Document struct bcm2835_spi
spi: bcm2835: Overcome sglist entry length limitation
spi: bcm2835: Speed up FIFO access if fill level is known

 drivers/spi/spi-bcm2835.c | 478 ++++++++++++++++++++++++++------------
 1 file changed, 334 insertions(+), 144 deletions(-)
Signature · 1 line
2.19.1