From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
imx@lists.linux.dev, joy.zou@nxp.com,
Frank Li <Frank.Li@nxp.com>
Subject: [PATCH RFC 11/12] dmaengine: fsl-edma: use local soff/doff variables
Date: Wed, 28 Jan 2026 13:05:30 -0500 [thread overview]
Message-ID: <20260128-dma_ll_comlib-v1-11-1b1fa2c671f9@nxp.com> (raw)
In-Reply-To: <20260128-dma_ll_comlib-v1-0-1b1fa2c671f9@nxp.com>
Introduce local soff and doff variables (and related fields) so that memcpy
set_lli() handling matches the sg and cyclic cases.
Prepare the fsl-edma driver for moving prep_slave_{sg,cyclic} into the
common linked-list library.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/dma/fsl-edma-common.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index ff1ef067cfcffef876eefd30c62d630c77ac537a..fdac0518316914d59df592ad26f6000d2034bcb9 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -517,6 +517,10 @@ static int fsl_edma_set_lli(struct dma_ll_desc *desc, u32 idx,
struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
void *tcd = desc->its[idx].vaddr;
u32 src_bus_width, dst_bus_width;
+ bool disable_req;
+ u32 soff, doff;
+ u32 nbytes;
+ u16 iter;
/* Memory to memory */
if (!config) {
@@ -524,6 +528,12 @@ static int fsl_edma_set_lli(struct dma_ll_desc *desc, u32 idx,
dst_bus_width = min_t(u32, DMA_SLAVE_BUSWIDTH_32_BYTES, 1 << (ffs(dst) - 1));
fsl_chan->is_sw = true;
+
+ soff = src_bus_width;
+ doff = dst_bus_width;
+ iter = 1;
+ disable_req = true;
+ nbytes = len;
}
if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_MEM_REMOTE)
@@ -532,7 +542,7 @@ static int fsl_edma_set_lli(struct dma_ll_desc *desc, u32 idx,
/* To match with copy_align and max_seg_size so 1 tcd is enough */
__fsl_edma_fill_tcd(fsl_chan, tcd, src, dst,
fsl_edma_get_tcd_attr(src_bus_width, dst_bus_width),
- src_bus_width, len, 0, 1, 1, dst_bus_width, irq, true);
+ soff, nbytes, 0, iter, iter, doff, irq, disable_req);
return 0;
}
--
2.34.1
next prev parent reply other threads:[~2026-01-28 18:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 18:05 [PATCH RFC 00/12] dmaengine: introduce common linked-list DMA controller framework Frank Li
2026-01-28 18:05 ` [PATCH RFC 01/12] dmaengine: Extend virt_chan for link list based DMA engines Frank Li
2026-01-28 18:05 ` [PATCH RFC 02/12] dmaengine: Add common dma_ll_desc and dma_linklist_item for link-list controllers Frank Li
2026-01-28 18:05 ` [PATCH RFC 03/12] dmaengine: fsl-edma: Remove redundant echan from struct fsl_edma_desc Frank Li
2026-01-28 18:05 ` [PATCH RFC 04/12] dmaengine: fsl-edma: Use common dma_ll_desc in vchan Frank Li
2026-01-28 18:05 ` [PATCH RFC 05/12] dmaengine: Add DMA pool allocation in vchan_dma_ll_init() and API vchan_dma_ll_free() Frank Li
2026-01-28 18:05 ` [PATCH RFC 06/12] dmaengine: Move fsl_edma_(alloc|free)_desc() to common library Frank Li
2026-01-28 18:05 ` [PATCH RFC 07/12] dmaengine: virt-dma: split vchan_tx_prep() into init and internal helpers Frank Li
2026-01-28 18:05 ` [PATCH RFC 08/12] dmaengine: Factor out fsl-edma prep_memcpy into common vchan helper Frank Li
2026-01-28 18:05 ` [PATCH RFC 09/12] dmaengine: ll-dma: support multi-descriptor memcpy for large transfers Frank Li
2026-01-28 18:05 ` [PATCH RFC 10/12] dmaengine: move fsl-edma dma_[un]map_resource() to linked list library Frank Li
2026-01-28 18:05 ` Frank Li [this message]
2026-01-28 18:05 ` [PATCH RFC 12/12] dmaengine: add vchan_dma_ll_prep_slave_{sg,cyclic} API Frank Li
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=20260128-dma_ll_comlib-v1-11-1b1fa2c671f9@nxp.com \
--to=frank.li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=joy.zou@nxp.com \
--cc=linux-kernel@vger.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