Skip to contentSkip to conversation

dma: sdma: setup dma mask

PATCH New Philippe Rétornaz 4 participants 6 messages Oct 1, 2013 – Oct 14, 2013

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

cover dma: sdma: setup dma mask

Hello

The imx-sdma dma engine is not setuping it's dma mask. This leads to a non-working audio setup since imx-ssi is using the generic soc-dmaengine-pcm which allocate the dma buffer differently than the previous code.

This patch is based on Russell King's following patches:
- DMA-API: provide a helper to set both DMA and coherent DMA masks
- DMA-API: provide a helper to setup DMA masks

Philippe R?tornaz (1):
dma: imx-sdma: setup dma mask

 drivers/dma/imx-sdma.c |    4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 dma: imx-sdma: setup dma mask

The dma mask is not configured in the current code. This was triggered by soc-dmaengine-pcm which allocate the dma buffers with the imx-sdma as device.
This commit fix audio on imx31.

---
 drivers/dma/imx-sdma.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/imx-sdma.c +4 -0
index fc43603..c1fd504 100644
@@ -1432,6 +1432,10 @@ static int __init sdma_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
 	sdma = kzalloc(sizeof(*sdma), GFP_KERNEL);
 	if (!sdma)
 		return -ENOMEM;
Signature · 1 line
1.7.9.5
maintainer
#2 lore raw

PATCH 1/1 dma: imx-sdma: setup dma mask

Quoted 6 lines · Philippe R?tornaz

The dma mask is not configured in the current code. This was triggered by soc-dmaengine-pcm which allocate the dma buffers with the imx-sdma as device.
This commit fix audio on imx31.

Sascha

Quoted 23 lines
---
 drivers/dma/imx-sdma.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/imx-sdma.c +4 -0
index fc43603..c1fd504 100644
@@ -1432,6 +1432,10 @@ static int __init sdma_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
 	sdma = kzalloc(sizeof(*sdma), GFP_KERNEL);
 	if (!sdma)
 		return -ENOMEM;
Signature · 1 line
1.7.9.5
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#3 lore raw

PATCH 1/1 dma: imx-sdma: setup dma mask

In reply to Philippe Rétornaz
Quoted 6 lines · Philippe R?tornaz

The dma mask is not configured in the current code. This was triggered by soc-dmaengine-pcm which allocate the dma buffers with the imx-sdma as device.
This commit fix audio on imx31.

This needs to go thru Russell's tree, that has the below API

Acked-by Vinod Koul <[email protected]>

~Vinod

Quoted 22 lines
---
 drivers/dma/imx-sdma.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/imx-sdma.c +4 -0
index fc43603..c1fd504 100644
@@ -1432,6 +1432,10 @@ static int __init sdma_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
 	sdma = kzalloc(sizeof(*sdma), GFP_KERNEL);
 	if (!sdma)
 		return -ENOMEM;
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 1/1 dma: imx-sdma: setup dma mask

Quoted 10 lines · Vinod Koul
Quoted 6 lines · Philippe R?tornaz

The dma mask is not configured in the current code. This was triggered by soc-dmaengine-pcm which allocate the dma buffers with the imx-sdma as device.
This commit fix audio on imx31.

This needs to go thru Russell's tree, that has the below API

Acked-by Vinod Koul <[email protected]>

Indeed.

#5 lore raw

PATCH 1/1 dma: imx-sdma: setup dma mask

Le 14/10/2013 01:48, Russell King - ARM Linux a ?crit :

Quoted 7 lines · Vinod Koul
Quoted 6 lines · Philippe R?tornaz
Quoted 5 lines

The dma mask is not configured in the current code. This was triggered by soc-dmaengine-pcm which allocate the dma buffers with the imx-sdma as device.
This commit fix audio on imx31.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

This needs to go thru Russell's tree, that has the below API

Acked-by Vinod Koul <[email protected]>

Indeed.

It's in the patch system with id 7857/1
I hope I got it right.... First time I'm using your patch system.

Thanks,

Philippe