[PATCH v2 0/2] Chunk splitting of spi transfers

Lukas Wunner lukas at wunner.de
Sun Feb 25 13:19:10 UTC 2018


[cc += linux-rpi-kernel at lists.infradead.org]

On Sat, Feb 24, 2018 at 06:15:59PM +0000, Meghana Madhyastha wrote:
> I've added bcm2835_spi_transfer_one_message in spi-bcm2835. This calls
> spi_split_transfers_maxsize to split large chunks for spi dma transfers. 
> I then removed chunk splitting in the tinydrm spi helper (as now the core
> is handling the chunk splitting). However, although the SPI HW should be
> able to accomodate up to 65535 bytes for dma transfers, the splitting of
> chunks to 65535 bytes results in a dma transfer time out error. However,
> when the chunks are split to < 64 bytes it seems to work fine.

Hm, that is really odd, how did you test this exactly, what did you
use as SPI slave?  It contradicts our own experience, we're using
Micrel KSZ8851 Ethernet chips as SPI slave on spi0 of a BCM2837
and can send/receive messages via DMA to the tune of several hundred
bytes without any issues.  In fact, for messages < 96 bytes, DMA is
not used at all, so you've probably been using interrupt mode,
see the BCM2835_SPI_DMA_MIN_LENGTH macro in spi-bcm2835.c.

Thanks,

Lukas


More information about the dri-devel mailing list