All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
@ 2014-11-21 17:23 H Hartley Sweeten
  2014-11-28 11:35 ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2014-11-21 17:23 UTC (permalink / raw)
  To: linux-arm-kernel

The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
will fail with error messages like this:

  ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset

  ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset

Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
devices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Jeremy Moles <cubicool@gmail.com>
Tested-by: Alexander Sverdlin <subaparts@yandex.ru>
Cc: Ryan Mallon <rmallon@gmail.com>
---
This fixes a problem with the sound/soc/cirrus/edb93xx.c driver not loading
and fixes the sound on these tested boards:

  EDB9315A (like)  - tested by Jeremy Moles
  EDB9302 (like)   - tested by Alexander Sverdlin
  EDB9307A (stock) - tested by H Hartley Sweeten

 arch/arm/mach-ep93xx/dma.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c
index d8bfd02..88a4c9b 100644
--- a/arch/arm/mach-ep93xx/dma.c
+++ b/arch/arm/mach-ep93xx/dma.c
@@ -66,11 +66,15 @@ static struct ep93xx_dma_platform_data ep93xx_dma_m2p_data = {
 	.num_channels		= ARRAY_SIZE(ep93xx_dma_m2p_channels),
 };
 
+static u64 ep93xx_dma_m2p_mask = DMA_BIT_MASK(32);
+
 static struct platform_device ep93xx_dma_m2p_device = {
 	.name			= "ep93xx-dma-m2p",
 	.id			= -1,
 	.dev			= {
-		.platform_data	= &ep93xx_dma_m2p_data,
+		.platform_data		= &ep93xx_dma_m2p_data,
+		.dma_mask		= &ep93xx_dma_m2p_mask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
 	},
 };
 
@@ -93,11 +97,15 @@ static struct ep93xx_dma_platform_data ep93xx_dma_m2m_data = {
 	.num_channels		= ARRAY_SIZE(ep93xx_dma_m2m_channels),
 };
 
+static u64 ep93xx_dma_m2m_mask = DMA_BIT_MASK(32);
+
 static struct platform_device ep93xx_dma_m2m_device = {
 	.name			= "ep93xx-dma-m2m",
 	.id			= -1,
 	.dev			= {
-		.platform_data	= &ep93xx_dma_m2m_data,
+		.platform_data		= &ep93xx_dma_m2m_data,
+		.dma_mask		= &ep93xx_dma_m2m_mask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
 	},
 };
 
-- 
2.0.3

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-11-21 17:23 [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers H Hartley Sweeten
@ 2014-11-28 11:35 ` Arnd Bergmann
  2014-11-28 22:30   ` Hartley Sweeten
  2014-12-01 17:16   ` Hartley Sweeten
  0 siblings, 2 replies; 8+ messages in thread
From: Arnd Bergmann @ 2014-11-28 11:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 21 November 2014, H Hartley Sweeten wrote:
> The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
> will fail with error messages like this:
> 
>   ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset
> 
>   ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset
> 
> Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
> devices.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Reported-by: Jeremy Moles <cubicool@gmail.com>
> Tested-by: Alexander Sverdlin <subaparts@yandex.ru>
> Cc: Ryan Mallon <rmallon@gmail.com>

Applied to next/fixes-non-critical. I couldn't tell from your description
whether you want this on 3.18 or even backported to older releases,
which I guess would make sense.

If you want a backport, let me know.

Thanks,

	Arnd

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-11-28 11:35 ` Arnd Bergmann
@ 2014-11-28 22:30   ` Hartley Sweeten
  2014-12-01 17:16   ` Hartley Sweeten
  1 sibling, 0 replies; 8+ messages in thread
From: Hartley Sweeten @ 2014-11-28 22:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, November 28, 2014 4:35 AM, Arnd Bergmann wrote:
> On Friday 21 November 2014, H Hartley Sweeten wrote:
>> The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
>> will fail with error messages like this:
>>
>>   ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset
>>
>>   ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset
>>
>> Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
>> devices.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Reported-by: Jeremy Moles <cubicool@gmail.com>
>> Tested-by: Alexander Sverdlin <subaparts@yandex.ru>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>
> Applied to next/fixes-non-critical. I couldn't tell from your description
> whether you want this on 3.18 or even backported to older releases,
> which I guess would make sense.
>
> If you want a backport, let me know.

Arnd,

This fixes the ep93xx sound driver. It should probably be backported and
applied to 3.18.

The sound driver was broken when it was converted to the dmaengine API.
I missed this when the driver was converted because my normal ep93xx
boards do not have sound support.

I'll try to determine when the audio actually broke so we can figure out how
far the backport needs to go,

Thanks,
Hartley

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-11-28 11:35 ` Arnd Bergmann
  2014-11-28 22:30   ` Hartley Sweeten
@ 2014-12-01 17:16   ` Hartley Sweeten
  2014-12-01 17:58     ` Arnd Bergmann
  1 sibling, 1 reply; 8+ messages in thread
From: Hartley Sweeten @ 2014-12-01 17:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, November 28, 2014 4:36 AM, Arnd Bergmann wrote:
> On Friday 21 November 2014, H Hartley Sweeten wrote:
>> The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
>> will fail with error messages like this:
>> 
>>   ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset
>> 
>>   ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset
>> 
>> Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
>> devices.
>> 
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Reported-by: Jeremy Moles <cubicool@gmail.com>
>> Tested-by: Alexander Sverdlin <subaparts@yandex.ru>
>> Cc: Ryan Mallon <rmallon@gmail.com>
>
> Applied to next/fixes-non-critical. I couldn't tell from your description
> whether you want this on 3.18 or even backported to older releases,
> which I guess would make sense.
>
> If you want a backport, let me know.

Arnd,

I think the ep93xx audio got broken around this commit:

commit e27e8a60cb4ca8e3b047c5d6ee9afff9c4c5b61a
Author: Lars-Peter Clausen <lars@metafoo.de>
Date:   Sat Apr 20 19:29:05 2013 +0200

    ASoC: ep93xx: Use generic dmaengine PCM

But I'm not sure exactly where. I will try to narrow it down.

There appear to be a number of ep93xx users still out there but
they are mostly still using 2.6 kernels. It might be ok to just get
this fix in for 3.18 and then wait to see if anyone complains about
the sound not working in older kernels.

Thanks,
Hartley

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-12-01 17:16   ` Hartley Sweeten
@ 2014-12-01 17:58     ` Arnd Bergmann
  2014-12-01 21:14       ` Hartley Sweeten
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-12-01 17:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 01 December 2014 17:16:18 Hartley Sweeten wrote:
> On Friday, November 28, 2014 4:36 AM, Arnd Bergmann wrote:
> > On Friday 21 November 2014, H Hartley Sweeten wrote:
> >> The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
> >> will fail with error messages like this:
> >> 
> >>   ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset
> >> 
> >>   ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset
> >> 
> >> Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
> >> devices.
> >> 
> >> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >> Reported-by: Jeremy Moles <cubicool@gmail.com>
> >> Tested-by: Alexander Sverdlin <subaparts@yandex.ru>
> >> Cc: Ryan Mallon <rmallon@gmail.com>
> >
> > Applied to next/fixes-non-critical. I couldn't tell from your description
> > whether you want this on 3.18 or even backported to older releases,
> > which I guess would make sense.
> >
> > If you want a backport, let me know.
> 
> Arnd,
> 
> I think the ep93xx audio got broken around this commit:
> 
> commit e27e8a60cb4ca8e3b047c5d6ee9afff9c4c5b61a
> Author: Lars-Peter Clausen <lars@metafoo.de>
> Date:   Sat Apr 20 19:29:05 2013 +0200
> 
>     ASoC: ep93xx: Use generic dmaengine PCM
> 
> But I'm not sure exactly where. I will try to narrow it down.
> 
> There appear to be a number of ep93xx users still out there but
> they are mostly still using 2.6 kernels. It might be ok to just get
> this fix in for 3.18 and then wait to see if anyone complains about
> the sound not working in older kernels.

Is there any harm in applying the fix on older kernels? If not, I'd just
mark it as stable for 3.11, which will cause it to get backported to
3.17, 3.14 and 3.12 but not 3.10 or older longerm releases.

	Arnd

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-12-01 17:58     ` Arnd Bergmann
@ 2014-12-01 21:14       ` Hartley Sweeten
  2014-12-04 16:08         ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Hartley Sweeten @ 2014-12-01 21:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, December 01, 2014 10:59 AM, Arnd Bergmann wrote:
> Is there any harm in applying the fix on older kernels? If not, I'd just
> mark it as stable for 3.11, which will cause it to get backported to
> 3.17, 3.14 and 3.12 but not 3.10 or older longerm releases.

I don't see any harm with it. It just adds the dma_mask data that
should have been there anyway.

Thanks,
Hartley

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
  2014-12-01 21:14       ` Hartley Sweeten
@ 2014-12-04 16:08         ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2014-12-04 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 01 December 2014 21:14:36 Hartley Sweeten wrote:
> On Monday, December 01, 2014 10:59 AM, Arnd Bergmann wrote:
> > Is there any harm in applying the fix on older kernels? If not, I'd just
> > mark it as stable for 3.11, which will cause it to get backported to
> > 3.17, 3.14 and 3.12 but not 3.10 or older longerm releases.
> 
> I don't see any harm with it. It just adds the dma_mask data that
> should have been there anyway.
> 

Ok, I've applied it to the fixes branch now as a reminder, with the

Cc: <stable@vger.kernel.org> # v3.11+

line added. It's already in next/fixes-non-critical, so the patch will
make it into 3.19, but if this is the only patch left for 3.18, we probably
won't send it. If not, I'll send an email to the stable list so it gets
backported.

I just noticed that we didn't have arm at kernel.org on Cc and you had just
sent the patch to me personally. To ensure that something gets picked up,
please send it to the arm at kernel.org alias so it doesn't accidentally get
lost, thanks!

	Arnd

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

* [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers
       [not found] <1416415519-4903-1-git-send-email-hsweeten@visionengravers.com>
@ 2014-11-19 17:55 ` Alexander Sverdlin
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Sverdlin @ 2014-11-19 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi!

On 19/11/14 17:45, H Hartley Sweeten wrote:
> The dma_mask and coherent_dma_mask need to be set or DMA memory allocations
> will fail with error messages like this:
>
>    ep93xx-dma ep93xx-dma-m2p: coherent DMA mask is unset
>
>    ep93xx-dma ep93xx-dma-m2m: coherent DMA mask is unset
>
> Add the missing information to the ep93xx-dma-m2p and ep93xx-dma-m2m
> devices.
>
> This fixes a problem with the sound/soc/edb93xx.c driver not loading
> that was reported by Jeremy Moles.

This repaired the sound on EDB9302-like board for me, so:

> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Reported-by: Jeremy Moles <cubicool@gmail.com>

Tested-by: Alexander Sverdlin <subaparts@yandex.ru>

> Cc: Alexander Sverdlin <subaparts@yandex.ru>
> Cc: Ryan Mallon <rmallon@gmail.com>
> ---
>   arch/arm/mach-ep93xx/dma.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c
> index d8bfd02..88a4c9b 100644
> --- a/arch/arm/mach-ep93xx/dma.c
> +++ b/arch/arm/mach-ep93xx/dma.c
> @@ -66,11 +66,15 @@ static struct ep93xx_dma_platform_data ep93xx_dma_m2p_data = {
>   	.num_channels		= ARRAY_SIZE(ep93xx_dma_m2p_channels),
>   };
>
> +static u64 ep93xx_dma_m2p_mask = DMA_BIT_MASK(32);
> +
>   static struct platform_device ep93xx_dma_m2p_device = {
>   	.name			= "ep93xx-dma-m2p",
>   	.id			= -1,
>   	.dev			= {
> -		.platform_data	= &ep93xx_dma_m2p_data,
> +		.platform_data		= &ep93xx_dma_m2p_data,
> +		.dma_mask		= &ep93xx_dma_m2p_mask,
> +		.coherent_dma_mask	= DMA_BIT_MASK(32),
>   	},
>   };
>
> @@ -93,11 +97,15 @@ static struct ep93xx_dma_platform_data ep93xx_dma_m2m_data = {
>   	.num_channels		= ARRAY_SIZE(ep93xx_dma_m2m_channels),
>   };
>
> +static u64 ep93xx_dma_m2m_mask = DMA_BIT_MASK(32);
> +
>   static struct platform_device ep93xx_dma_m2m_device = {
>   	.name			= "ep93xx-dma-m2m",
>   	.id			= -1,
>   	.dev			= {
> -		.platform_data	= &ep93xx_dma_m2m_data,
> +		.platform_data		= &ep93xx_dma_m2m_data,
> +		.dma_mask		= &ep93xx_dma_m2m_mask,
> +		.coherent_dma_mask	= DMA_BIT_MASK(32),
>   	},
>   };
>
>

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

end of thread, other threads:[~2014-12-04 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 17:23 [PATCH] arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers H Hartley Sweeten
2014-11-28 11:35 ` Arnd Bergmann
2014-11-28 22:30   ` Hartley Sweeten
2014-12-01 17:16   ` Hartley Sweeten
2014-12-01 17:58     ` Arnd Bergmann
2014-12-01 21:14       ` Hartley Sweeten
2014-12-04 16:08         ` Arnd Bergmann
     [not found] <1416415519-4903-1-git-send-email-hsweeten@visionengravers.com>
2014-11-19 17:55 ` Alexander Sverdlin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.