[PATCH 7/7] OF: set dma_mask for ARM

Rob Herring robherring2 at gmail.com
Wed Nov 17 07:33:55 EST 2010


From: Rob Herring <rob.herring at calxeda.com>

Various drivers require dma_mask to be valid, so it needs to be setup
when doing OF probing on ARM.

Signed-off-by: Rob Herring <rob.herring at calxeda.com>
---
 drivers/of/platform.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 5b4a07f..fe2669a 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -614,7 +614,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
 	}
 
 	dev->dev.of_node = of_node_get(np);
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
 	dev->dev.dma_mask = &dev->archdata.dma_mask;
 #endif
 	dev->dev.parent = parent;
@@ -644,7 +644,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
 	if (!dev)
 		return NULL;
 
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_ARM)
 	dev->archdata.dma_mask = 0xffffffffUL;
 #endif
 	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-- 
1.7.1



More information about the devicetree-discuss mailing list