Take a look at Re: Accessing UART spi i2c from Yocto Linux in Intel galileo . Let me know if you find some information on the spi drivers.This is for the Galileo but it will give you a good starting point.
I have tested the spidev of the edison through spidev_test.c and spidev_fdx.c.It is ok!
But when I make a dirver by myself,I meet a big problem.
I include spi.h into my driver and I can creat right node on yocto linux.
After I insmod this module,
root@myedison:~# insmod flash_spi_driver2.ko [ 1455.879475] BUG: sleeping function called from invalid context at /myedison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux/mm/slub.c:926 [ 1455.879632] in_atomic(): 1, irqs_disabled(): 1, pid: 453, name: insmod [ 1455.880571] BUG: scheduling while atomic: insmod/453/0x00000002 [ 1455.911779] BUG: scheduling while atomic: insmod/453/0x00000002 [ 1455.919711] enter probe [ 1455.926406] flashdev init succeed
Everything is ok.And /dev/flashdev5.2 and /sys/class/flashdev are existed.
But when I read this device in userspace,I meet problem.
root@myedison:~# ./flashdev_app please input the signal before open device open device [ 1484.290173] dev is opened read now please input the signal [ 1484.294067] intel_mid_ssp_spi_unified 0000:00:07.1: ERROR : DMA buffers already mapped
Do you know how to fix it?
The spi bus is 5 and the chip_select is 2.
I have solved this problem.The spi_device.comtoller.DMA_en must be set "false".
Now,my spi driver is working.
can someone provide some performance data with the SPI driver here?
Since the DMA could not be used, I would like to know what would be the number of bytes/second average on the SPI.