Re: [PATCH 4/4] spi: s3c64xx: Fix large transfers with DMA

From: Krzysztof Kozlowski
Date: Mon Sep 19 2022 - 05:43:28 EST


On 16/09/2022 13:39, Vincent Whitchurch wrote:
> 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. Fix this by splitting the
> transfer as needed.
>
> With this, the len>64 KiB tests in spi-loopback-test pass.
>
> (Note that len==64 KiB tests work even without this patch for some reason.
> The driver programs 0 to the COUNT_VALUE field in that case, but it's
> unclear if it's by design, since the hardware documentation doesn't say
> anything about the behaviour when COUNT_VALUE == 0, so play it safe and
> split at 65535.)
>
> Fixes: 230d42d422e7b69 ("spi: Add s3c64xx SPI Controller driver")
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@xxxxxxxx>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>


Best regards,
Krzysztof