Re: [PATCH v4 4/9] dmaengine: dw-edma: Use new .device_prep_config_sg() callback
Manivannan Sadhasivam <[email protected]> Tue, 12 May 2026 19:33:51 +0530
| Newsgroups | dev.linux.lists.mhi,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-nvme,org.kernel.vger.dmaengine,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <bjroe5qbpggiolfqqexm5vy2edmhxp5qyrejxdklwlg5y53gfc@n3bz7i2jqja6> |
On Wed, May 06, 2026 at 04:44:16PM -0400, Frank Li wrote: > Use the new .device_prep_config_sg() callback to combine configuration and > descriptor preparation. > > No functional changes. > > Tested-by: Niklas Cassel <[email protected]> > Reviewed-by: Damien Le Moal <[email protected]> > Signed-off-by: Frank Li <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> - Mani > --- > change in v4 > - drop context in callback. > change in v3 > - add Damien Le Moal review tag > --- > drivers/dma/dw-edma/dw-edma-core.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c > index c2feb3adc79fa94b016913443305b9fae9deef12..f7f58b0010e26b529ffb7382d5b166a703587c71 100644 > --- a/drivers/dma/dw-edma/dw-edma-core.c > +++ b/drivers/dma/dw-edma/dw-edma-core.c > @@ -577,10 +577,11 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) > } > > static struct dma_async_tx_descriptor * > -dw_edma_device_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl, > - unsigned int len, > - enum dma_transfer_direction direction, > - unsigned long flags, void *context) > +dw_edma_device_prep_config_sg(struct dma_chan *dchan, struct scatterlist *sgl, > + unsigned int len, > + enum dma_transfer_direction direction, > + unsigned long flags, > + struct dma_slave_config *config) > { > struct dw_edma_transfer xfer; > > @@ -591,6 +592,9 @@ dw_edma_device_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl, > xfer.flags = flags; > xfer.type = EDMA_XFER_SCATTER_GATHER; > > + if (config) > + dw_edma_device_config(dchan, config); > + > return dw_edma_device_transfer(&xfer); > } > > @@ -970,7 +974,7 @@ static int dw_edma_channel_setup(struct dw_edma *dw, u32 wr_alloc, u32 rd_alloc) > dma->device_terminate_all = dw_edma_device_terminate_all; > dma->device_issue_pending = dw_edma_device_issue_pending; > dma->device_tx_status = dw_edma_device_tx_status; > - dma->device_prep_slave_sg = dw_edma_device_prep_slave_sg; > + dma->device_prep_config_sg = dw_edma_device_prep_config_sg; > dma->device_prep_dma_cyclic = dw_edma_device_prep_dma_cyclic; > dma->device_prep_interleaved_dma = dw_edma_device_prep_interleaved_dma; > > > -- > 2.43.0 > -- மணிவண்ணன் சதாசிவம்