dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: xilinx: Add empty device_config function
@ 2020-06-13 14:58 Marek Vasut
  2020-06-14 15:38 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2020-06-13 14:58 UTC (permalink / raw)
  To: dmaengine
  Cc: Marek Vasut, Akinobu Mita, Kedareswara rao Appana, Michal Simek,
	Vinod Koul

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>
---
 drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 5429497d3560b..058150ff9e0d9 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -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;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: xilinx: Add empty device_config function
  2020-06-13 14:58 [PATCH] dmaengine: xilinx: Add empty device_config function Marek Vasut
@ 2020-06-14 15:38 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-06-14 15:38 UTC (permalink / raw)
  To: Marek Vasut
  Cc: dmaengine, Akinobu Mita, Kedareswara rao Appana, Michal Simek,
	Vinod Koul

On 13-06-20, 16:58, Marek Vasut wrote:
> 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>

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

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 5429497d3560b..058150ff9e0d9 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -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;
> +}

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

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 14:58 [PATCH] dmaengine: xilinx: Add empty device_config function Marek Vasut
2020-06-14 15:38 ` Vinod Koul

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git