]> git.karo-electronics.de Git - linux-beck.git/commit
spi: davinci: always start transmit DMA
authorBrian Niebuhr <bniebuhr@efjohnson.com>
Tue, 28 Sep 2010 08:29:26 +0000 (13:59 +0530)
committerSekhar Nori <nsekhar@ti.com>
Thu, 18 Nov 2010 13:08:33 +0000 (18:38 +0530)
commitc29e3c60e75d1cc1262ac8af379738b6fd851f33
tree19697ab9c0a16e8152f31825ddb8a413ef3b1b72
parent96fd881f22b44fc14772316a6b9231012393cda8
spi: davinci: always start transmit DMA

Due to the full duplex nature of the SPI bus, the SPI master
on DaVinci needs transmit to be active even if the tranfer is
only meant to collect receive data.

The current code achieves this by using a temporary zeroed buffer
to provide DMA data in case the transfer does not have a transmit
buffer provided.

However, the transmit DMA is started only if transmit buffer is
provided rendering the temporary buffer unused. Instead the code
relies on a write to SPIDAT1 register to trigger transmit operation.
This however only sends two bytes of data.

Fix this by starting transmit DMA always.

This changes exposes a bug on DM355 where the CSHOLD bit in
SPIDAT1 needs to be written to in between transfers. Handle
that by introducing a "cshold_bug" platform data which is
set to true for DM355.

Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Tested-By: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/include/mach/spi.h
drivers/spi/davinci_spi.c