Hello,
while working with SPI driver "davinci_spi_master" I've noticed a problem. When SPI is working in 3 PIN mode, there is CS. The only wires are DIN, DOUT, CLK. But I've noticed that when writing to SPI, a spurious byte is generated every time SPI is accessed. For example, if I write 4 bytes on SPI, a 5th byte is generated and sent out. I've tracked the problem down to the function "davinci_spi_chipselect()" in "davinci_spi_master.c". The problem is that when this function writes configuration bit CSNR in register SPIDAT1, a spurious byte is sent since every write to SPIDAT1 caused its data content to be sent to the shift register. While this normally does not cause any problem (since all CS are held high), in 3 wire mode the spurious byte is considered valid (there is no CS).