Commit 3d8d59f9 authored by Laurentiu-Cristian Duca's avatar Laurentiu-Cristian Duca Committed by Jan Kiszka

am335x (beaglebone black) omap4 spi real-time driver.

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: default avatarLaurentiu-Cristian Duca <laurentiu.duca@gmail.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent bb21224f
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment