]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: s3c64xx: Use DMA mode from fifo size
authorJaewon Kim <jaewon02.kim@samsung.com>
Fri, 29 Mar 2024 08:58:40 +0000 (17:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:12 +0000 (16:38 +0200)
commit17c82c67c139a01a226a1a875fd62b9c0a06aaa3
tree4a3f4070f97ec58c4cfd4f92ad3e83071377de62
parentf5c7f24a3655bd05b67810cbf9a4c43a7a069c3a
spi: s3c64xx: Use DMA mode from fifo size

[ Upstream commit a3d3eab627bbbb0cb175910cf8d0f7022628a642 ]

If the SPI data size is smaller than FIFO, it operates in PIO mode,
and if it is larger than FIFO size, it oerates in DMA mode.

If the SPI data size is equal to fifo, it operates in PIO mode and it is
separated to 2 transfers. To prevent it, it must operate in DMA mode
from the case where the data size and the fifo size are the same.

Fixes: 1ee806718d5e ("spi: s3c64xx: support interrupt based pio mode")
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20240329085840.65856-1-jaewon02.kim@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-s3c64xx.c