diff mbox

[1/3] ARM: s3c24xx: add dma_coherent_mask for DMA devices

Message ID 1430676910-30657-1-git-send-email-anarsoul@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vasily Khoruzhick May 3, 2015, 6:15 p.m. UTC
Otherwise dma_alloc_coherent() fails.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm/mach-s3c24xx/common.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Krzysztof Kozlowski May 4, 2015, 3:42 a.m. UTC | #1
2015-05-04 3:15 GMT+09:00 Vasily Khoruzhick <anarsoul@gmail.com>:
> Otherwise dma_alloc_coherent() fails.

Could you say few more words about the failure?
Also the patch looks like a candidate for CC-stable along with Fixes tag.

>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  arch/arm/mach-s3c24xx/common.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index bf50328..7ed0853 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -355,6 +355,7 @@ struct platform_device s3c2410_device_dma = {
>         .resource       = s3c2410_dma_resource,
>         .dev    = {
>                 .platform_data  = &s3c2410_dma_platdata,
> +               .coherent_dma_mask = ~0,

DMA_BIT_MASK(32)?

>         },
>  };
>  #endif
> @@ -452,6 +453,7 @@ struct platform_device s3c2440_device_dma = {
>         .resource       = s3c2410_dma_resource,
>         .dev    = {
>                 .platform_data  = &s3c2440_dma_platdata,
> +               .coherent_dma_mask = ~0,

Ditto.

Best regards,
Krzysztof
Vasily Khoruzhick May 4, 2015, 5:54 p.m. UTC | #2
On Mon, May 4, 2015 at 6:42 AM, Krzysztof Kozlowski
<k.kozlowski@samsung.com> wrote:
> 2015-05-04 3:15 GMT+09:00 Vasily Khoruzhick <anarsoul@gmail.com>:
>> Otherwise dma_alloc_coherent() fails.
>
> Could you say few more words about the failure?
> Also the patch looks like a candidate for CC-stable along with Fixes tag.

Hm, any call of dma_alloc_coherent() will fail for s3c24xx-dmac
device. For example, asoc dmaengine driver. What exactly do
you want me to precise?

>>
>> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
>> ---
>>  arch/arm/mach-s3c24xx/common.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
>> index bf50328..7ed0853 100644
>> --- a/arch/arm/mach-s3c24xx/common.c
>> +++ b/arch/arm/mach-s3c24xx/common.c
>> @@ -355,6 +355,7 @@ struct platform_device s3c2410_device_dma = {
>>         .resource       = s3c2410_dma_resource,
>>         .dev    = {
>>                 .platform_data  = &s3c2410_dma_platdata,
>> +               .coherent_dma_mask = ~0,
>
> DMA_BIT_MASK(32)?
>
>>         },
>>  };
>>  #endif
>> @@ -452,6 +453,7 @@ struct platform_device s3c2440_device_dma = {
>>         .resource       = s3c2410_dma_resource,
>>         .dev    = {
>>                 .platform_data  = &s3c2440_dma_platdata,
>> +               .coherent_dma_mask = ~0,
>
> Ditto.
>
> Best regards,
> Krzysztof
Krzysztof Kozlowski May 5, 2015, 3:38 a.m. UTC | #3
2015-05-05 2:54 GMT+09:00 Vasily Khoruzhick <anarsoul@gmail.com>:
> On Mon, May 4, 2015 at 6:42 AM, Krzysztof Kozlowski
> <k.kozlowski@samsung.com> wrote:
>> 2015-05-04 3:15 GMT+09:00 Vasily Khoruzhick <anarsoul@gmail.com>:
>>> Otherwise dma_alloc_coherent() fails.
>>
>> Could you say few more words about the failure?
>> Also the patch looks like a candidate for CC-stable along with Fixes tag.
>
> Hm, any call of dma_alloc_coherent() will fail for s3c24xx-dmac
> device. For example, asoc dmaengine driver. What exactly do
> you want me to precise?

Anything more than just "fails" would be welcome. Especially for
backporting to stable.

Best regards,
Krzysztof
diff mbox

Patch

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index bf50328..7ed0853 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -355,6 +355,7 @@  struct platform_device s3c2410_device_dma = {
 	.resource	= s3c2410_dma_resource,
 	.dev	= {
 		.platform_data	= &s3c2410_dma_platdata,
+		.coherent_dma_mask = ~0,
 	},
 };
 #endif
@@ -452,6 +453,7 @@  struct platform_device s3c2440_device_dma = {
 	.resource	= s3c2410_dma_resource,
 	.dev	= {
 		.platform_data	= &s3c2440_dma_platdata,
+		.coherent_dma_mask = ~0,
 	},
 };
 #endif