]> git.baikalelectronics.ru Git - kernel.git/commit
spi: s3c64xx: Fix large transfers with DMA
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Tue, 27 Sep 2022 11:21:17 +0000 (13:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:25 +0000 (13:22 +0200)
commitf13b897aa47cb25b5af9b02be82a0c5d6df733ca
tree4198c927e69977dc0ce3fba8249b7b891dbf30c1
parent3bbcff3b5b416b22882a4a75fb6c70b217f091da
spi: s3c64xx: Fix large transfers with DMA

[ Upstream commit 4ff7fe52aec9d3d1fd42506b053d229bb1448648 ]

The COUNT_VALUE in the PACKET_CNT register is 16-bit so the maximum
value is 65535.  Asking the driver to transfer a larger size currently
leads to the DMA transfer timing out.  Implement ->max_transfer_size()
and have the core split the transfer as needed.

Fixes: d79ba34842d0 ("spi: Add s3c64xx SPI Controller driver")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20220927112117.77599-5-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-s3c64xx.c