From: Frank Li <Frank.li@oss.nxp.com>
To: Sheetal <sheetal@nvidia.com>
Cc: vkoul@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, Frank.Li@kernel.org, ldewangan@nvidia.com,
jonathanh@nvidia.com, thierry.reding@kernel.org,
mkumard@nvidia.com, spujar@nvidia.com, dmaengine@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dmaengine: tegra210-adma: Make Tegra264 FIFO size explicit
Date: Tue, 24 Nov 2026 15:07:50 -0500 [thread overview]
Message-ID: <awXulkfUW7rvYeFe@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20261120050254.1343679-3-sheetal@nvidia.com>
On Fri, Nov 20, 2026 at 05:02:53AM +0000, Sheetal wrote:
> Tegra264 uses the same ADMA FIFO size for every ADMAIF request. The
> driver currently obtains this by setting sreq_index_offset to zero,
> which makes every valid request select a FIFO size of 2.
>
> Add a SoC data field for the uniform FIFO size and set it to 2 for
> Tegra264. Retain the request-index-based FIFO selection for earlier
> SoCs. This preserves existing FIFO programming and allows devices
> with a different uniform FIFO size to specify it in their SoC data.
>
> Signed-off-by: Sheetal <sheetal@nvidia.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes in v2:
> - Retain .sreq_index_offset = 0; omit the unrelated cleanup.
>
> drivers/dma/tegra210-adma.c | 25 +++++++++++++++++++------
> 1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
> index 21a381d022cf..2640ea7d6ff2 100644
> --- a/drivers/dma/tegra210-adma.c
> +++ b/drivers/dma/tegra210-adma.c
> @@ -101,6 +101,7 @@ struct tegra_adma;
> * @ch_reg_size: Size of DMA channel register space.
> * @nr_channels: Number of DMA channels available.
> * @ch_fifo_size_mask: Mask for FIFO size field.
> + * @ch_fifo_size: FIFO size for devices with uniform channel FIFO size.
> * @sreq_index_offset: Slave channel index offset.
> * @max_page: Maximum ADMA Channel Page.
> * @set_global_pg_config: Global page programming.
> @@ -125,6 +126,7 @@ struct tegra_adma_chip_data {
> unsigned int ch_reg_size;
> unsigned int nr_channels;
> unsigned int ch_fifo_size_mask;
> + unsigned int ch_fifo_size;
> unsigned int sreq_index_offset;
> unsigned int max_page;
> void (*set_global_pg_config)(struct tegra_adma *tdma);
> @@ -725,18 +727,28 @@ static int tegra_adma_set_xfer_params(struct tegra_adma_chan *tdc,
> *
> * ADMA FIFO size is set as per below (based on default ADMAIF channel
> * FIFO sizes):
> + * For Tegra264:
> + * fifo_size = ch_fifo_size
> + * For devices prior to Tegra264:
> * fifo_size = 0x2 (sreq_index > sreq_index_offset)
> * fifo_size = 0x3 (sreq_index <= sreq_index_offset)
> *
> */
> - if (tdc->sreq_index > cdata->sreq_index_offset)
> + if (cdata->ch_fifo_size) {
> ch_regs->fifo_ctrl =
> - ADMA_CH_REG_FIELD_VAL(2, cdata->ch_fifo_size_mask,
> - fifo_size_shift);
> - else
> - ch_regs->fifo_ctrl =
> - ADMA_CH_REG_FIELD_VAL(3, cdata->ch_fifo_size_mask,
> + ADMA_CH_REG_FIELD_VAL(cdata->ch_fifo_size,
> + cdata->ch_fifo_size_mask,
> fifo_size_shift);
> + } else {
> + if (tdc->sreq_index > cdata->sreq_index_offset)
> + ch_regs->fifo_ctrl =
> + ADMA_CH_REG_FIELD_VAL(2, cdata->ch_fifo_size_mask,
> + fifo_size_shift);
> + else
> + ch_regs->fifo_ctrl =
> + ADMA_CH_REG_FIELD_VAL(3, cdata->ch_fifo_size_mask,
> + fifo_size_shift);
> + }
>
> ch_regs->tc = desc->period_len & ADMA_CH_TC_COUNT_MASK;
>
> @@ -1018,6 +1030,7 @@ static const struct tegra_adma_chip_data tegra264_chip_data = {
> .ch_reg_size = 0x100,
> .nr_channels = 64,
> .ch_fifo_size_mask = 0x7f,
> + .ch_fifo_size = 2,
> .sreq_index_offset = 0,
> .max_page = 10,
> .set_global_pg_config = tegra264_adma_global_page_config,
next prev parent reply other threads:[~2026-11-24 20:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 5:02 [PATCH v2 0/3] dmaengine: tegra210-adma: Add Tegra268 support Sheetal
2026-11-20 5:02 ` [PATCH v2 1/3] dt-bindings: dma: nvidia,tegra210-adma: " Sheetal
2026-11-20 5:02 ` [PATCH v2 2/3] dmaengine: tegra210-adma: Make Tegra264 FIFO size explicit Sheetal
2026-11-24 20:07 ` Frank Li [this message]
2026-11-20 5:02 ` [PATCH v2 3/3] dmaengine: tegra210-adma: Add Tegra268 support Sheetal
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=awXulkfUW7rvYeFe@lizhi-Precision-Tower-5810 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=robh@kernel.org \
--cc=sheetal@nvidia.com \
--cc=spujar@nvidia.com \
--cc=thierry.reding@kernel.org \
--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
all inboxes | Powered by JetHome®