]> 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)
committerMark Brown <broonie@kernel.org>
Wed, 28 Sep 2022 11:54:07 +0000 (12:54 +0100)
commit4ff7fe52aec9d3d1fd42506b053d229bb1448648
tree952baf3beff982f301d685a0e3e1d5e63e3a0b94
parent169793e8a3900c5efc94ab27f7bb66a2f78831a8
spi: s3c64xx: Fix large transfers with DMA

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>
drivers/spi/spi-s3c64xx.c