mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-11 09:47:00 +02:00
dma: ti: k3-udma: Use ring_idx to pair k3 nav rings
Use ring_idx to pair rings. ring_idx will be same as tx flow_id for all non-negative flow_ids. For negative flow_ids, ring_idx will be tchan->id added with bchan_cnt. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/ti/k3-udma.c?h=v6.8-rc2#n1686 Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
This commit is contained in:
parent
798ad3e6b2
commit
4312a1dfca
@ -876,13 +876,20 @@ static int udma_alloc_tx_resources(struct udma_chan *uc)
|
|||||||
{
|
{
|
||||||
struct k3_nav_ring_cfg ring_cfg;
|
struct k3_nav_ring_cfg ring_cfg;
|
||||||
struct udma_dev *ud = uc->ud;
|
struct udma_dev *ud = uc->ud;
|
||||||
int ret;
|
struct udma_tchan *tchan;
|
||||||
|
int ring_idx, ret;
|
||||||
|
|
||||||
ret = udma_get_tchan(uc);
|
ret = udma_get_tchan(uc);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = k3_nav_ringacc_request_rings_pair(ud->ringacc, uc->tchan->id, -1,
|
tchan = uc->tchan;
|
||||||
|
if (tchan->tflow_id >= 0)
|
||||||
|
ring_idx = tchan->tflow_id;
|
||||||
|
else
|
||||||
|
ring_idx = ud->bchan_cnt + tchan->id;
|
||||||
|
|
||||||
|
ret = k3_nav_ringacc_request_rings_pair(ud->ringacc, ring_idx, -1,
|
||||||
&uc->tchan->t_ring,
|
&uc->tchan->t_ring,
|
||||||
&uc->tchan->tc_ring);
|
&uc->tchan->tc_ring);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
Loading…
Reference in New Issue
Block a user