All of lore.kernel.org
 help / color / mirror / Atom feed
From: MD Danish Anwar <danishanwar@ti.com>
To: Maxime Ripard <mripard@kernel.org>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Roger Quadros <rogerq@kernel.org>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
	Kamlesh Gurudasani <kamlesh@ti.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Neha Malcom Francis <n-francis@ti.com>, Andrew Davis <afd@ti.com>,
	MD Danish Anwar <danishanwar@ti.com>,
	Ramon Fried <rfried.dev@gmail.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Cc: <u-boot@lists.denx.de>, <srk@ti.com>, <r-gunasekaran@ti.com>
Subject: [RFC PATCH 01/16] dma: ti: k3-udma: Use ring_idx to pair k3 nav rings
Date: Tue, 19 Dec 2023 16:04:03 +0530	[thread overview]
Message-ID: <20231219103418.3445886-2-danishanwar@ti.com> (raw)
In-Reply-To: <20231219103418.3445886-1-danishanwar@ti.com>

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.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
---
 drivers/dma/ti/k3-udma.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 8a62d63dfe..eea9ec9659 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -876,13 +876,20 @@ static int udma_alloc_tx_resources(struct udma_chan *uc)
 {
 	struct k3_nav_ring_cfg ring_cfg;
 	struct udma_dev *ud = uc->ud;
-	int ret;
+	struct udma_tchan *tchan;
+	int ring_idx, ret;
 
 	ret = udma_get_tchan(uc);
 	if (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->tc_ring);
 	if (ret) {
-- 
2.34.1


  reply	other threads:[~2023-12-19 11:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 10:34 [RFC PATCH 00/16] Introduce ICSSG Ethernet driver MD Danish Anwar
2023-12-19 10:34 ` MD Danish Anwar [this message]
2023-12-19 10:34 ` [RFC PATCH 02/16] net: ti: icssg: Add Firmware Interface for " MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 03/16] net: ti: icssg: Add Firmware config and classification APIs MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 04/16] net: ti: icssg: Add icssg queues APIs and macros MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 05/16] net: ti: icssg: Add ICSSG ethernet driver MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 06/16] net: ti: icssg: Add support sending FDB command to update rx_flow_id MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 07/16] net: ti: icssg: Enforce pinctrl state on the MDIO child node MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 08/16] arm: dts: k3-am65: Add additional regs for DMA components MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 09/16] arm: dts: k3-am65: Add cfg reg region to ringacc node MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 10/16] arm: dts: k3-am65-main: Add ICSSG IEP nodes MD Danish Anwar
2023-12-19 17:46   ` Tom Rini
2023-12-20  4:47     ` MD Danish Anwar
2023-12-20 12:52       ` Nishanth Menon
2023-12-20 13:23         ` Anwar, Md Danish
2023-12-19 10:34 ` [RFC PATCH 11/16] arm: dts: k3-am654-base-board: Add ICSSG2 Ethernet support MD Danish Anwar
2023-12-20 10:08   ` Roger Quadros
2023-12-20 10:13     ` Anwar, Md Danish
2023-12-19 10:34 ` [RFC PATCH 12/16] arm: dts: k3-am65x-binman: Add ICSSG2 overlay and configuration MD Danish Anwar
2023-12-20 10:40   ` Roger Quadros
2023-12-27 10:19     ` MD Danish Anwar
2024-01-10  6:50       ` MD Danish Anwar
2024-01-10  8:54         ` Roger Quadros
2024-01-10  9:02           ` MD Danish Anwar
2024-01-10 11:42             ` Roger Quadros
2023-12-19 10:34 ` [RFC PATCH 13/16] configs: am65x_evm_a53: Enable ICSSG Driver MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 14/16] configs: am65x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY MD Danish Anwar
2023-12-20 10:02   ` Roger Quadros
2023-12-21  5:57     ` MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 15/16] tools/fdtgrep: Include __symbols__ table MD Danish Anwar
2023-12-26  9:47   ` Simon Glass
2024-01-10  9:52     ` MD Danish Anwar
2023-12-19 10:34 ` [RFC PATCH 16/16] board: ti: am65x: Add check for k3-am654-icssg2 in board_fit_config_match() MD Danish Anwar
  -- strict thread matches above, loose matches on Subject: below --
2023-12-19 10:11 [RFC PATCH 00/16] Introduce ICSSG Ethernet driver MD Danish Anwar
2023-12-19 10:11 ` [RFC PATCH 01/16] dma: ti: k3-udma: Use ring_idx to pair k3 nav rings MD Danish Anwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231219103418.3445886-2-danishanwar@ti.com \
    --to=danishanwar@ti.com \
    --cc=afd@ti.com \
    --cc=joe.hershberger@ni.com \
    --cc=kamlesh@ti.com \
    --cc=m-chawdhry@ti.com \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=mripard@kernel.org \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=r-gunasekaran@ti.com \
    --cc=rfried.dev@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=sjg@chromium.org \
    --cc=srk@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.