linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma: imx-dma: configure the generic DMA type to make it work
@ 2021-07-29  7:18 Juergen Borleis
  2021-08-02  7:03 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Borleis @ 2021-07-29  7:18 UTC (permalink / raw)
  To: dmaengine
  Cc: linux-imx, festevam, linux-arm-kernel, linux-kernel, shawnguo,
	vkoul, kernel

Commit dea7a9f
  dmaengine: imx-dma: remove dma_slave_config direction usage

changes the method from a "configuration when called" to an "configuration
when used". Due to this, only the cyclic DMA type gets configured
correctly, while the generic DMA type is left non-configured.

Without this additional call, the struct imxdma_channel::word_size member
is stuck at DMA_SLAVE_BUSWIDTH_UNDEFINED and imxdma_prep_slave_sg() always
returns NULL.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 drivers/dma/imx-dma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 7f116bb..2ddc31e 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -812,6 +812,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
 		dma_length += sg_dma_len(sg);
 	}
 
+	imxdma_config_write(chan, &imxdmac->config, direction);
+
 	switch (imxdmac->word_size) {
 	case DMA_SLAVE_BUSWIDTH_4_BYTES:
 		if (sg_dma_len(sgl) & 3 || sgl->dma_address & 3)
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dma: imx-dma: configure the generic DMA type to make it work
  2021-07-29  7:18 [PATCH] dma: imx-dma: configure the generic DMA type to make it work Juergen Borleis
@ 2021-08-02  7:03 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-08-02  7:03 UTC (permalink / raw)
  To: Juergen Borleis
  Cc: dmaengine, linux-imx, festevam, linux-arm-kernel, linux-kernel,
	shawnguo, kernel

On 29-07-21, 09:18, Juergen Borleis wrote:
> Commit dea7a9f

you should use 12+ chars for sha1 
>   dmaengine: imx-dma: remove dma_slave_config direction usage

even with this is commit log, you made the patch tile dma: ....!
> 
> changes the method from a "configuration when called" to an "configuration
> when used". Due to this, only the cyclic DMA type gets configured
> correctly, while the generic DMA type is left non-configured.
> 
> Without this additional call, the struct imxdma_channel::word_size member
> is stuck at DMA_SLAVE_BUSWIDTH_UNDEFINED and imxdma_prep_slave_sg() always
> returns NULL.

I ahve fixed the subsystem name, updated commit in 12 chars and format
expected, added it as Fixes line and applied.

Please take care of these things!

> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> ---
>  drivers/dma/imx-dma.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 7f116bb..2ddc31e 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -812,6 +812,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
>  		dma_length += sg_dma_len(sg);
>  	}
>  
> +	imxdma_config_write(chan, &imxdmac->config, direction);
> +
>  	switch (imxdmac->word_size) {
>  	case DMA_SLAVE_BUSWIDTH_4_BYTES:
>  		if (sg_dma_len(sgl) & 3 || sgl->dma_address & 3)
> -- 
> 2.20.1

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-08-02  7:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29  7:18 [PATCH] dma: imx-dma: configure the generic DMA type to make it work Juergen Borleis
2021-08-02  7:03 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).