Skip to content
Permalink
Browse files
dmaengine: xilinx: Add empty device_config function
Various DMA users call the dmaengine_slave_config() and expect it to
succeed, but that can only succeed if .device_config is implemented.
Add empty device_config function rather than patching all the places
which use dmaengine_slave_config().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Marek Vasut authored and intel-lab-lkp committed Jul 18, 2021
1 parent e73f0f0 commit 89cc716182246c22a6c7bdb666952b3cec945a0a
Showing 1 changed file with 12 additions and 0 deletions.
@@ -1649,6 +1649,17 @@ static void xilinx_dma_issue_pending(struct dma_chan *dchan)
spin_unlock_irqrestore(&chan->lock, flags);
}

/**
* xilinx_dma_issue_pending - Configure the DMA channel
* @dchan: DMA channel
* @config: channel configuration
*/
static int xilinx_dma_device_config(struct dma_chan *dchan,
struct dma_slave_config *config)
{
return 0;
}

/**
* xilinx_dma_complete_descriptor - Mark the active descriptor as complete
* @chan : xilinx DMA channel
@@ -3084,6 +3095,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
xdev->common.device_synchronize = xilinx_dma_synchronize;
xdev->common.device_tx_status = xilinx_dma_tx_status;
xdev->common.device_issue_pending = xilinx_dma_issue_pending;
xdev->common.device_config = xilinx_dma_device_config;
if (xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
dma_cap_set(DMA_CYCLIC, xdev->common.cap_mask);
xdev->common.device_prep_slave_sg = xilinx_dma_prep_slave_sg;

0 comments on commit 89cc716

Please sign in to comment.