aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUdit Kumar <u-kumar1@ti.com>2024-02-21 19:53:44 +0530
committerTom Rini <trini@konsulko.com>2024-03-04 13:41:04 -0500
commit7022640c10f027e6e2cff00012b3740a78f8b9bc (patch)
tree040314475691db58e413f19b682c748d46bf2276
parent87720385ab69396d045b9d9cf045896593f1774c (diff)
downloadu-boot-7022640c10f027e6e2cff00012b3740a78f8b9bc.zip
u-boot-7022640c10f027e6e2cff00012b3740a78f8b9bc.tar.gz
u-boot-7022640c10f027e6e2cff00012b3740a78f8b9bc.tar.bz2
dma: ti: k3-udma: Fix ring_idx to pair k3 nav rings
ring_idx was not correctly assigned in case of tflow_id is zero. Which leads to wrong pairing of DMA for drivers like OSPI. Fixes: 4312a1dfca26 ("dma: ti: k3-udma: Use ring_idx to pair k3 nav rings") Reviewed-by: Jai Luthra <j-luthra@ti.com> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
-rw-r--r--drivers/dma/ti/k3-udma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index ed0a9bf..ef3074a 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -884,10 +884,10 @@ static int udma_alloc_tx_resources(struct udma_chan *uc)
return ret;
tchan = uc->tchan;
- if (tchan->tflow_id >= 0)
+ if (tchan->tflow_id > 0)
ring_idx = tchan->tflow_id;
else
- ring_idx = ud->bchan_cnt + tchan->id;
+ ring_idx = tchan->id;
ret = k3_nav_ringacc_request_rings_pair(ud->ringacc, ring_idx, -1,
&uc->tchan->t_ring,