[PATCH V2] spi: bcm2835: enabling polling mode for transfers shorter than 30us

Mark Brown broonie at kernel.org
Sat Apr 18 05:27:48 PDT 2015

On Sat, Apr 18, 2015 at 02:13:56PM +0200, Martin Sperl wrote:
> > On 18.04.2015, at 13:53, Mark Brown <broonie at kernel.org> wrote:

> > As I've said several times now 1s seems far too long for a busy wait,
> > the driver should fall back to something that sleeps after an initial
> > busy wait (once it's clear we're over time).

> Then I have misread what you wrote - I understood you wanted to avoid
> having no timeout at all.

No, that's correct - we shouldn't be busy waiting for ever so we need
something that will terminate.

> So you want something like:
> * wait for 4 jiffies (which is 40ms typically)
> * if we exceed that, then enable interrupts for the rest of the transfer
> and let the 30s timeout handle everything else

That's probably fine, though the 40ms is a bit on the long side.  The
30s timeout could use pulling in too, that's going to fail very badly if
anything does go wronng.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20150418/9a1f25ea/attachment.sig>

More information about the linux-rpi-kernel mailing list