[PATCH 4/4] spi: s3c64xx: Fix large transfers with DMA
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Mon Sep 19 02:43:16 PDT 2022
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 at axis.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list