spi: davinci: use rx buffer as dummy tx buffer
authorFrode Isaksen <fisaksen@baylibre.com>
Thu, 23 Feb 2017 18:01:58 +0000 (19:01 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 15 Mar 2017 19:35:39 +0000 (19:35 +0000)
commit6b3a631e7f8eca75a987ed760898d28fb3628143
tree25fca4f838523eb829c5313c6c88ffcead168026
parent3e2e1258443ea97e40dfb4a3cf15108d17939066
spi: davinci: use rx buffer as dummy tx buffer

When doing rx-only transfer, the transfer will fail
if the number of SG entries exceeds 20.
This happens because the eDMA DMA engine is limited
to 20 SG entries in one transaction, and when the
DMA transcation is resumed (which takes > 150us),
rx errors occurs because the slave is still transmitting.
Fix this by using the rx buffer as the dummy tx buffer,
so that resuming the rx transcation happens at the same
time as resuming the tx transcation.

Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c