[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260114-dma_common_config-v1-4-64feb836ff04@nxp.com>
Date: Wed, 14 Jan 2026 12:12:45 -0500
From: Frank Li <Frank.Li@....com>
To: Vinod Koul <vkoul@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
Frank Li <Frank.Li@....com>
Subject: [PATCH 4/6] dmaengine: imx-sdma: use common config at dma_chan
Use common config at dma_chan. No functional change.
Signed-off-by: Frank Li <Frank.Li@....com>
---
drivers/dma/imx-sdma.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index ed9e56de5a9b9484c6598d438f66a836504818be..13a9522eb914bd7808a079fd661d99e8fcff6a0b 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -413,7 +413,6 @@ struct sdma_desc {
* @sdma: pointer to the SDMA engine for this channel
* @channel: the channel number, matches dmaengine chan_id + 1
* @direction: transfer type. Needed for setting SDMA script
- * @slave_config: Slave configuration
* @peripheral_type: Peripheral type. Needed for setting SDMA script
* @event_id0: aka dma request line
* @event_id1: for channels that use 2 events
@@ -449,7 +448,6 @@ struct sdma_channel {
struct sdma_engine *sdma;
unsigned int channel;
enum dma_transfer_direction direction;
- struct dma_slave_config slave_config;
enum sdma_peripheral_type peripheral_type;
unsigned int event_id0;
unsigned int event_id1;
@@ -1647,7 +1645,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
struct scatterlist *sg;
struct sdma_desc *desc;
- sdma_config_write(chan, &sdmac->slave_config, direction);
+ sdma_config_write(chan, &chan->config, direction);
desc = sdma_transfer_init(sdmac, direction, sg_len);
if (!desc)
@@ -1739,7 +1737,7 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
if (sdmac->peripheral_type != IMX_DMATYPE_HDMI)
num_periods = buf_len / period_len;
- sdma_config_write(chan, &sdmac->slave_config, direction);
+ sdma_config_write(chan, &chan->config, direction);
desc = sdma_transfer_init(sdmac, direction, num_periods);
if (!desc)
@@ -1838,8 +1836,6 @@ static int sdma_config(struct dma_chan *chan,
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
- memcpy(&sdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg));
-
if (dmaengine_cfg->peripheral_config) {
struct sdma_peripheral_config *sdmacfg = dmaengine_cfg->peripheral_config;
if (dmaengine_cfg->peripheral_size != sizeof(struct sdma_peripheral_config)) {
--
2.34.1
Powered by blists - more mailing lists