Skip to contentSkip to conversation

dma: ti: k3-udma: Reset the channel during release

PATCH New Vignesh Raghavendra 3 participants 3 messages Sep 17, 2020 – Oct 12, 2020

Subsystems (2)
lore
Share & tools
lore

Vignesh Raghavendra

author maintainer
#0 lore raw

PATCH 1/1 dma: ti: k3-udma: Reset the channel during release

Reset the channel completely during channel release in order to clear teardown bit before handing over to next user or jumping to Linux.

---
 drivers/dma/ti/k3-udma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/ti/k3-udma.c +3 -1
index 57d9fbfabb..94216045cc 100644
@@ -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);
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 dma: ti: k3-udma: Reset the channel during release

Quoted 14 lines · Vignesh Raghavendra

Reset the channel completely during channel release in order to clear teardown bit before handing over to next user or jumping to Linux.

---
  drivers/dma/ti/k3-udma.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/ti/k3-udma.c +0 -0
index 57d9fbfabb..94216045cc 100644

drivers/dma/ti/k3-udma.c err_free_res: · line 1142

Quoted 10 lines
drivers/dma/ti/k3-udma.c +3 -1
@@ -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);

Thank you.

Signature · 2 lines
Best regards,
grygorii