diff mbox

[1/1] dma: imx-sdma: setup dma mask

Message ID 1380623464-24652-2-git-send-email-philippe.retornaz@epfl.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Philippe Rétornaz Oct. 1, 2013, 10:31 a.m. UTC
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.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
---
 drivers/dma/imx-sdma.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Sascha Hauer Oct. 2, 2013, 8:33 a.m. UTC | #1
On Tue, Oct 01, 2013 at 12:31:04PM +0200, Philippe Rétornaz wrote:
> 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.
> 
> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Sascha

> ---
>  drivers/dma/imx-sdma.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index fc43603..c1fd504 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -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;
> -- 
> 1.7.9.5
> 
>
Vinod Koul Oct. 13, 2013, 4:18 p.m. UTC | #2
On Tue, Oct 01, 2013 at 12:31:04PM +0200, Philippe Rétornaz wrote:
> 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.
> 
> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
This needs to go thru Russell's tree, that has the below API

Acked-by Vinod Koul <vinod.koul@intel.com>

~Vinod

> ---
>  drivers/dma/imx-sdma.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index fc43603..c1fd504 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -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;
> -- 
> 1.7.9.5
>
Russell King - ARM Linux Oct. 13, 2013, 11:48 p.m. UTC | #3
On Sun, Oct 13, 2013 at 09:48:01PM +0530, Vinod Koul wrote:
> On Tue, Oct 01, 2013 at 12:31:04PM +0200, Philippe Rétornaz wrote:
> > 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.
> > 
> > Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
> This needs to go thru Russell's tree, that has the below API
> 
> Acked-by Vinod Koul <vinod.koul@intel.com>

Indeed.
Philippe Rétornaz Oct. 14, 2013, 8:47 a.m. UTC | #4
Le 14/10/2013 01:48, Russell King - ARM Linux a écrit :
> On Sun, Oct 13, 2013 at 09:48:01PM +0530, Vinod Koul wrote:
>> On Tue, Oct 01, 2013 at 12:31:04PM +0200, Philippe Rétornaz wrote:
>>> 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.
>>>
>>> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
>> This needs to go thru Russell's tree, that has the below API
>>
>> Acked-by Vinod Koul <vinod.koul@intel.com>
>
> 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
diff mbox

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index fc43603..c1fd504 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -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;