spi: sun6i: reduce DMA RX transfer width to single byte
authorTobias Schramm <t.schramm@manjaro.org>
Sun, 27 Aug 2023 15:25:57 +0000 (17:25 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 4 Sep 2023 12:55:29 +0000 (13:55 +0100)
commit171f8a49f212e87a8b04087568e1b3d132e36a18
treefa9c28405c8e6178e9190fe38ac2a89a2fa78f8b
parent2dde18cd1d8fac735875f2e4987f11817cc0bc2c
spi: sun6i: reduce DMA RX transfer width to single byte

Through empirical testing it has been determined that sometimes RX SPI
transfers with DMA enabled return corrupted data. This is down to single
or even multiple bytes lost during DMA transfer from SPI peripheral to
memory. It seems the RX FIFO within the SPI peripheral can become
confused when performing bus read accesses wider than a single byte to it
during an active SPI transfer.

This patch reduces the width of individual DMA read accesses to the
RX FIFO to a single byte to mitigate that issue.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Link: https://lore.kernel.org/r/20230827152558.5368-2-t.schramm@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sun6i.c