Hi all,
I am trying to hunt down what I think is a bug in setting SPI bus devices from a kernel module. The kernel is from PSP SDK 03.22.00.06, the processor is am1705.The board is custom.
When I run spidev_test against spidev1.0 I get this SPI data transfer error after the first byte of 2 is sent out. This error statement is found in spi-davinci.c, davinci_spi_bufs and I have seen that the rcount and wcound are not zero indicating the transfer didn't complete. I have tried SPI_MODEs 0 to 3 but the result is always the same.1050.csi_module_config.h4527.csi_module_config.c
An analyzer shows me that this data is also not what was supposed to be sent. I have no trouble reading and writing to the SPI flash on bus 0.
This output is from the kernel module running the configuration to setup the SPI buses.
Configuring for CSI module SPM. . .
GPIO setup complete
spi_davinci spi_davinci.0: DMA: supported
spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
spi_davinci spi_davinci.0: Controller at 0xfec41000
SPI master on bus 0 registered. . .
m25p80 spi0.0: found s25fl016k, expected m25p80
m25p80 spi0.0: s25fl016k (2048 Kbytes)
created spidev0.0
created spidev0.1
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
spi_davinci spi_davinci.1: Controller at 0xfee12000
SPI master on bus 1 registered. . .
created spidev1.0
CSI Module config complete for CSI_MODULE_SPM
I am attaching my kernel module code and would appreciate any feedback regarding this issue. Two more things to note here. Uboot sspi can communicate with no problem at all so it seems to be the kernel driver configuration. The second thing to note is that I have another custom board with a few more, and different, spi devices. This same kernel module configures that board as well and I have not seen this problem at all on this other board.