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)
commit1224e29572f655facfcd850cf0f0a4784f36a903
tree952baf3beff982f301d685a0e3e1d5e63e3a0b94
parent8d699ff95534747e394e0830399b8d5dcf03e738
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: 230d42d422e7 ("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