linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: Set the DMA mask to 64 bits on ARM LPAE systems
@ 2013-04-24  0:50 Laura Abbott
  2013-04-25 13:33 ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Laura Abbott @ 2013-04-24  0:50 UTC (permalink / raw)
  To: linux-arm-kernel

By default on ARM systems, the coherent DMA mask (lowest
address) is set to ~0 or 0xFFFFFFFFFFFFFFFF. Currently,
of_platform_device_create_pdata sets the coherent DMA mask to
32 bits. This prevents coherent dma allocations from working by default
without clients setting the DMA mask. Rather than make every client
on an LPAE system set the mask, set the mask to a 64 bit value on
ARM LPAE systems.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
 drivers/of/platform.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 0970505..18b69c1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -214,7 +214,11 @@ struct platform_device *of_platform_device_create_pdata(
 #if defined(CONFIG_MICROBLAZE)
 	dev->archdata.dma_mask = 0xffffffffUL;
 #endif
+#ifdef CONFIG_ARM_LPAE
+	dev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
+#else
 	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+#endif
 	dev->dev.bus = &platform_bus_type;
 	dev->dev.platform_data = platform_data;
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

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

end of thread, other threads:[~2013-04-26 16:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24  0:50 [PATCH] of: Set the DMA mask to 64 bits on ARM LPAE systems Laura Abbott
2013-04-25 13:33 ` Catalin Marinas
2013-04-25 17:09   ` Laura Abbott
2013-04-25 17:58     ` Russell King - ARM Linux
2013-04-26 10:00     ` Catalin Marinas
2013-04-26 16:58       ` Laura Abbott

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