[PATCH 2/2] spi: bcm2835: Allow platform to set realtime priority
Lukas Wunner
lukas at wunner.de
Thu Mar 23 05:02:57 PDT 2017
On Thu, Mar 23, 2017 at 11:07:18AM +0000, Mark Brown wrote:
> On Thu, Mar 23, 2017 at 11:36:45AM +0100, Lukas Wunner wrote:
> > +Optional properties:
> > +- bcm2835,rt_prio: Realtime priority of the message pump to minimize latency
> > + on the bus (0..99).
> > +
>
> This is going to depend on the software running on the board, I'd expect
> it to be something configured at runtime rather than fixed in DT.
On the Revolution Pi, the SPI master is hardwired to two KSZ8851 Ethernet
controllers which are connected to various fieldbus gateways in a
plug-and-play fashion. Low latencies are needed to achieve a decent
cycle rate when reading/writing data to the fieldbus devices.
Hence for this use case, the RT priority is mandated by the hardware
platform, which is why I put it in the devicetree. It is needed
regardless of which software is running.
We could accommodate to setting the RT priority on the command line but
we'd like to avoid always having to set it at runtime. That is already
possible by invoking chrt(1) from user space after the SPI master driver
has loaded and wouldn't require a kernel patch.
Also, if you question setting the RT priority in the devicetree, why
was that functionality allowed for pl022 in the first place?
Thanks,
Lukas
More information about the linux-rpi-kernel
mailing list