devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OF: update coherent_dma_mask
@ 2012-12-10 12:09 Subash Patel
  2012-12-10 16:30 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Subash Patel @ 2012-12-10 12:09 UTC (permalink / raw)
  To: devicetree-discuss, linux-arm-kernel, linux-samsung-soc
  Cc: subash.rp, thomas.abraham, kgene.kim

This patch is tested in ARM:exynos5250 with LPAE enabled. The coherent_dma_mask
needs to be defined to DMA_BIT_MASK(64) as dma-mapping API's check it against
64-bit mask.

Signed-off-by: Subash Patel <subash.rp@samsung.com>
---
 drivers/of/platform.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 9bdeaf30..3c5417b 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -214,7 +214,7 @@ struct platform_device *of_platform_device_create_pdata(
 #if defined(CONFIG_MICROBLAZE)
 	dev->archdata.dma_mask = 0xffffffffUL;
 #endif
-	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+	dev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
 	dev->dev.bus = &platform_bus_type;
 	dev->dev.platform_data = platform_data;
 
-- 
1.7.5.4

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

* Re: [PATCH] OF: update coherent_dma_mask
  2012-12-10 12:09 [PATCH] OF: update coherent_dma_mask Subash Patel
@ 2012-12-10 16:30 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2012-12-10 16:30 UTC (permalink / raw)
  To: Subash Patel
  Cc: devicetree-discuss, linux-arm-kernel, linux-samsung-soc,
	subash.rp, kgene.kim, thomas.abraham

On 12/10/2012 06:09 AM, Subash Patel wrote:
> This patch is tested in ARM:exynos5250 with LPAE enabled. The coherent_dma_mask
> needs to be defined to DMA_BIT_MASK(64) as dma-mapping API's check it against
> 64-bit mask.
> 
> Signed-off-by: Subash Patel <subash.rp@samsung.com>
> ---
>  drivers/of/platform.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 9bdeaf30..3c5417b 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -214,7 +214,7 @@ struct platform_device *of_platform_device_create_pdata(
>  #if defined(CONFIG_MICROBLAZE)
>  	dev->archdata.dma_mask = 0xffffffffUL;
>  #endif
> -	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> +	dev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
>  	dev->dev.bus = &platform_bus_type;
>  	dev->dev.platform_data = platform_data;

This is assuming all masters support 64-bit addressing which is probably
not universally valid. This really needs to be determined from the DT
and there's been recent patches to do this[1] although they need more work.

[1] - https://lkml.org/lkml/2012/12/4/54

Rob

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

end of thread, other threads:[~2012-12-10 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 12:09 [PATCH] OF: update coherent_dma_mask Subash Patel
2012-12-10 16:30 ` Rob Herring

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).