Skip to contentSkip to conversation

dmaengine: xilinx: Add empty device_config function

PATCH NAK Marek Vasut 2 participants 2 messages Jun 13, 2020 – Jun 14, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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().

Cc Akinobu Mita <[email protected]>
Cc Kedareswara rao Appana <[email protected]>
Cc Michal Simek <[email protected]>
Cc Vinod Koul <[email protected]>
---
 drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/dma/xilinx/xilinx_dma.c +12 -0
index 5429497d3560b..058150ff9e0d9 100644
@@ -1637,6 +1637,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
@@ -3076,6 +3087,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)
 	xdev->common.device_terminate_all = xilinx_dma_terminate_all;
 	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;
Signature · 1 line
2.26.2
maintainer NAK
#1 lore raw
Quoted 10 lines · Marek Vasut

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().

Cc Akinobu Mita <[email protected]>
Cc Kedareswara rao Appana <[email protected]>
Cc Michal Simek <[email protected]>
Cc Vinod Koul <[email protected]>

Umm, you should look up get_maintainers.pl to get right addresses :-)

Quoted 12 lines
---
 drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/dma/xilinx/xilinx_dma.c +0 -0
index 5429497d3560b..058150ff9e0d9 100644
@@ -1637,6 +1637,17 @@ static void xilinx_dma_issue_pending(struct dma_chan *dchan)
 	spin_unlock_irqrestore(&chan->lock, flags);
 }
 

drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_issue_pending(struct dma_chan *dchan) · line 1649

Quoted 10 lines
drivers/dma/xilinx/xilinx_dma.c +10 -0
+/**
+ * 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;
+}

NAK, the driver supports slave ops so it does not make sense for this to be dummy, right fix would be to use these params for configuring dma correctly

Signature · 1 line
~Vinod