New driver for a SPI controller equipped with HW queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are implementing a Linux SPI controller driver. The target device
has an HW queue that can store up to four SPI transfers, but we
couldn't see how to best deal with the SPI framework in order to take
full advantage of it.

We've seen that by making use of transfer_one_message() instead of
transfer_one() we can access as many transfers as there are inside the
same message, and this allows us to load the HW FIFO with some of
them; however we cannot see how we can take advantage of the HW FIFO
whenever SPI client drivers submits several messages (maybe with only
one transfer each).

Is there any way to get several transfer from the framework without
waiting to finish one to get the next even if they belongs to
different messages?

We've seen that some drivers (e.g. spi-pxa2xx.c) do use
spi_get_next_queued_message() in order to snoop into next messages,
but AFAICT they just use it to get some hint about how to handle the
chip-select; it seems that they still wait for the framework to call
their transfer_one_message() to actually push it to the HW.

We tried to dig into the SPI framework, but we couldn't locate the
place where messages are actually popped out of the controller message
list.. Also we couldn't get the point of 'queue' list in struct
spi_message; the above comment didn't help us indeed.. What's it for?

Any advice would be greatly appreciated..

Thanks
Andrea



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux