-
spi-omap2-mcspi-rt.c: I/O handling is lifted from omap2/4 mcspi linux driver. The code follows the model in spi-bcm2835.c. The theoretical maximum spi frequency of am335x omap4 is 48MHz, and the driver practical maximum frequency is limited to 40MHz. The omap4 maximum fifo queue size is 64 bytes, but when the transfer implies both sending and receiving it is limited to 32, so, in the driver things are kept simple: max 32 for tx and max 32 for rx. When the driver must transfer N bytes then ((int)(N/32))*32 bytes are transfered with fifo queue size 32 and (N mod 32) bytes are transfered with fifo queue size (N mod 32); between fifo setup, the slave chip select line is kept active by using the FORCE bit in the channel configuration register. Signed-off-by: Laurentiu-Cristian Duca <laurentiu.duca@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3d8d59f9