[PATCH 3/6] spi: bcm2835: fill FIFO before enabling interrupts to

Martin Sperl kernel at martin.sperl.org
Tue Apr 7 13:28:49 PDT 2015

> On 07.04.2015, at 20:23, Mark Brown <broonie at kernel.org> wrote:
> No it doesn't.  It creates a single message with two transfers (which is
> what I'd expect any user doing this to do, there are others that don't
> use the SPI helper APIs).
Well after rereading it now - it does copying, so I was making a naiv
assumption that it would do a single transfer, but then there is the
SPI_3WIRE case that is special.

In principle it could run in a single transfer at the cost of some
memory (64 vs. 32 bytes) for anything that is not SPI_3WIRE. But then
spi_transfer is also in the order of 32 bytes....

This definitely would speed up things for a "typical" interrupt-driven
driver implementation using the transfer_one interface, as it would avoid
one interrupt and 2 context switches.

On the other hand this could also get optimized inside the framework at
the cost of copying twice and we would optimize other cases as well.
But that is some other project...

More information about the linux-rpi-kernel mailing list