dma: ti: k3-udma: Reset the channel during release
authorVignesh Raghavendra <vigneshr@ti.com>
Thu, 17 Sep 2020 14:41:22 +0000 (20:11 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Mon, 12 Oct 2020 02:39:18 +0000 (08:09 +0530)
Reset the channel completely during channel release in order to clear
teardown bit before handing over to next user or jumping to Linux.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
drivers/dma/ti/k3-udma.c

index 57d9fbf..9421604 100644 (file)
@@ -1134,7 +1134,9 @@ err_free_res:
 
 static void udma_free_chan_resources(struct udma_chan *uc)
 {
-       /* Some configuration to UDMA-P channel: disable, reset, whatever */
+       /* Hard reset UDMA channel */
+       udma_stop_hard(uc);
+       udma_reset_counters(uc);
 
        /* Release PSI-L pairing */
        udma_navss_psil_unpair(uc->ud, uc->config.src_thread, uc->config.dst_thread);