dmaengine: ti: k3-udma: Set EOP for all TRs in cyclic BCDMA transfer
authorJai Luthra <j-luthra@ti.com>
Mon, 30 Sep 2024 17:02:54 +0000 (13:02 -0400)
committerVinod Koul <vkoul@kernel.org>
Mon, 14 Oct 2024 18:11:05 +0000 (23:41 +0530)
commitd35f40642904b017d1301340734b91aef69d1c0c
tree7a706ed1ae6b4ddc41304014236ddf6a08262314
parent6e9c5c8ef2820d18492d07172ac52f23ea8a54d9
dmaengine: ti: k3-udma: Set EOP for all TRs in cyclic BCDMA transfer

When receiving data in cyclic mode from PDMA peripherals, where reload
count is set to infinite, any TR in the set can potentially be the last
one of the overall transfer. In such cases, the EOP flag needs to be set
in each TR and PDMA's Static TR "Z" parameter should be set, matching
the size of the TR.

This is required for the teardown to function properly and cleanup the
internal state memory. This only affects platforms using BCDMA and not
those using UDMA-P, which could set EOP flag in the teardown TR
automatically.

Similarly when transmitting data in cyclic mode to PDMA peripherals, the
EOP flag needs to be set to get the teardown completion signal
correctly.

Fixes: 017794739702 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA")
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Verdin AM62
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Jai Luthra <jai.luthra@linux.dev>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20240930-z_cnt-v2-1-9d38aba149a2@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma.c