The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Sai Sree Kartheek Adivi <s-adivi@ti.com>,
	vkoul@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, nm@ti.com, ssantosh@kernel.org,
	dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, vigneshr@ti.com
Cc: r-sharma3@ti.com, gehariprasath@ti.com
Subject: Re: [PATCH v4 16/19] dmaengine: ti: k3-udma-v2: Add support for PKTDMA V2
Date: Tue, 3 Feb 2026 08:25:59 +0200	[thread overview]
Message-ID: <bb476db0-1421-4fdd-9415-85839425f9b9@gmail.com> (raw)
In-Reply-To: <20260130110159.359501-17-s-adivi@ti.com>



On 30/01/2026 13:01, Sai Sree Kartheek Adivi wrote:
> The PKTDMA V2 is different than the existing PKTDMA supported by the
> k3-udma driver.
> 
> The changes in PKTDMA V2 are:
> - Autopair: There is no longer a need for PSIL pair and AUTOPAIR bit
>   needs to set in the RT_CTL register.
> - Static channel mapping: Each channel is mapped to a single
>   peripheral.
> - Direct IRQs: There is no INT-A and interrupt lines from DMA are
>   directly connected to GIC.
> - Remote side configuration handled by DMA. So no need to write to
>   PEER registers to START / STOP / PAUSE / TEARDOWN.

Plus I suppose..

> 
> Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
> ---
>  drivers/dma/ti/k3-udma-common.c |  29 ++++-
>  drivers/dma/ti/k3-udma-v2.c     | 219 ++++++++++++++++++++++++++++++--
>  drivers/dma/ti/k3-udma.h        |   3 +
>  3 files changed, 232 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/dma/ti/k3-udma-common.c b/drivers/dma/ti/k3-udma-common.c
> index ba0fc048234ac..d6459bcc17599 100644
> --- a/drivers/dma/ti/k3-udma-common.c
> +++ b/drivers/dma/ti/k3-udma-common.c
> @@ -2461,12 +2461,21 @@ int pktdma_setup_resources(struct udma_dev *ud)
>  
>  	ud->tchan_map = devm_kmalloc_array(dev, BITS_TO_LONGS(ud->tchan_cnt),
>  					   sizeof(unsigned long), GFP_KERNEL);
> +	bitmap_zero(ud->tchan_map, ud->tchan_cnt);
>  	ud->tchans = devm_kcalloc(dev, ud->tchan_cnt, sizeof(*ud->tchans),
>  				  GFP_KERNEL);
> -	ud->rchan_map = devm_kmalloc_array(dev, BITS_TO_LONGS(ud->rchan_cnt),
> -					   sizeof(unsigned long), GFP_KERNEL);
> -	ud->rchans = devm_kcalloc(dev, ud->rchan_cnt, sizeof(*ud->rchans),
> -				  GFP_KERNEL);
> +	if (ud->match_data->type == DMA_TYPE_PKTDMA_V2) {
> +		ud->rchan_map = ud->tchan_map;
> +		ud->rchans = ud->tchans;
> +		ud->chan_map = ud->tchan_map;
> +		ud->chans = ud->tchans;

It has single channel space and the TX/RX functionality alternates
within the space?
chX: TX, chX+1: TX, chX+2: RX, chX+3: TX, etc?

> +	} else {
> +		ud->rchan_map = devm_kmalloc_array(dev, BITS_TO_LONGS(ud->rchan_cnt),
> +						   sizeof(unsigned long), GFP_KERNEL);
> +		bitmap_zero(ud->rchan_map, ud->rchan_cnt);
> +		ud->rchans = devm_kcalloc(dev, ud->rchan_cnt, sizeof(*ud->rchans),
> +					  GFP_KERNEL);
> +	}

...

> diff --git a/drivers/dma/ti/k3-udma-v2.c b/drivers/dma/ti/k3-udma-v2.c
> index af06d25fd598b..6761a079025ba 100644
> --- a/drivers/dma/ti/k3-udma-v2.c
> +++ b/drivers/dma/ti/k3-udma-v2.c
> @@ -744,6 +744,146 @@ static int bcdma_v2_alloc_chan_resources(struct dma_chan *chan)
>  	return ret;
>  }
>  
> +static int pktdma_v2_alloc_chan_resources(struct dma_chan *chan)
> +{
> +	struct udma_chan *uc = to_udma_chan(chan);
> +	struct udma_dev *ud = to_udma_dev(chan->device);
> +	u32 irq_ring_idx;
> +	__be32 addr[2] = {0, 0};
> +	struct of_phandle_args out_irq;
> +	int ret;

Nitpick: revers christmas tree declaration order.

-- 
Péter


  reply	other threads:[~2026-02-03  6:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 11:01 [PATCH v4 00/19] dmaengine: ti: Add support for BCDMA v2 and PKTDMA v2 Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 01/19] dmaengine: ti: k3-udma: move macros to header file Sai Sree Kartheek Adivi
2026-01-30 15:36   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 02/19] dmaengine: ti: k3-udma: move structs and enums " Sai Sree Kartheek Adivi
2026-01-30 15:37   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 03/19] dmaengine: ti: k3-udma: move static inline helper functions " Sai Sree Kartheek Adivi
2026-01-30 15:38   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 04/19] dmaengine: ti: k3-udma: move descriptor management to k3-udma-common.c Sai Sree Kartheek Adivi
2026-01-30 15:43   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 05/19] dmaengine: ti: k3-udma: move ring management functions " Sai Sree Kartheek Adivi
2026-01-30 15:46   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 06/19] dmaengine: ti: k3-udma: Add variant-specific function pointers to udma_dev Sai Sree Kartheek Adivi
2026-01-30 15:52   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 07/19] dmaengine: ti: k3-udma: move udma utility functions to k3-udma-common.c Sai Sree Kartheek Adivi
2026-01-30 15:58   ` Frank Li
2026-01-30 11:01 ` [PATCH v4 08/19] dmaengine: ti: k3-udma: move resource management " Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 09/19] dmaengine: ti: k3-udma: refactor resource setup functions Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 10/19] dmaengine: ti: k3-udma: move inclusion of k3-udma-private.c to k3-udma-common.c Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 11/19] drivers: soc: ti: k3-ringacc: handle absence of tisci Sai Sree Kartheek Adivi
2026-01-30 18:40   ` kernel test robot
2026-01-30 18:40   ` kernel test robot
2026-02-03  6:05   ` Péter Ujfalusi
2026-01-30 11:01 ` [PATCH v4 12/19] dt-bindings: dma: ti: Add K3 BCDMA V2 Sai Sree Kartheek Adivi
2026-01-30 15:35   ` Frank Li
2026-02-05  9:04   ` Krzysztof Kozlowski
2026-01-30 11:01 ` [PATCH v4 13/19] dt-bindings: dma: ti: Add K3 PKTDMA V2 Sai Sree Kartheek Adivi
2026-01-30 12:44   ` Rob Herring (Arm)
2026-01-30 15:34   ` Frank Li
2026-02-05  9:06   ` Krzysztof Kozlowski
2026-01-30 11:01 ` [PATCH v4 14/19] dmaengine: ti: k3-psil-am62l: Add AM62Lx PSIL and PDMA data Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 15/19] dmaengine: ti: k3-udma-v2: New driver for K3 BCDMA_V2 Sai Sree Kartheek Adivi
2026-01-30 16:08   ` Frank Li
2026-02-03  6:37   ` Péter Ujfalusi
2026-02-03  8:22     ` Sai Sree Kartheek Adivi
2026-02-03 18:14       ` Péter Ujfalusi
2026-01-30 11:01 ` [PATCH v4 16/19] dmaengine: ti: k3-udma-v2: Add support for PKTDMA V2 Sai Sree Kartheek Adivi
2026-02-03  6:25   ` Péter Ujfalusi [this message]
2026-02-03  7:51     ` Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 17/19] dmaengine: ti: k3-udma-v2: Update glue layer to support " Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 18/19] dmaengine: ti: k3-udma: Validate resource ID and fix logging in reservation Sai Sree Kartheek Adivi
2026-01-30 11:01 ` [PATCH v4 19/19] dmaengine: ti: k3-udma: switch to synchronous descriptor freeing Sai Sree Kartheek Adivi
2026-01-30 20:37   ` kernel test robot
2026-02-05  9:07     ` Krzysztof Kozlowski
2026-02-11  7:42   ` Sai Sree Kartheek Adivi
2026-02-03  6:42 ` [PATCH v4 00/19] dmaengine: ti: Add support for BCDMA v2 and PKTDMA v2 Péter Ujfalusi

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=bb476db0-1421-4fdd-9415-85839425f9b9@gmail.com \
    --to=peter.ujfalusi@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=gehariprasath@ti.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=r-sharma3@ti.com \
    --cc=robh@kernel.org \
    --cc=s-adivi@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox