aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-10-30 00:36:46 -0400
committerRob Herring <rob.herring@calxeda.com>2013-11-03 15:16:49 -0500
commit0589342c27944e50ebd7a54f5215002b6598b748 (patch)
tree93ad000060b521fce1df0820e228a3fc7776fca0 /drivers/of
parent13ccacd5945aa5ce81d8566f57587e95fbd90742 (diff)
of: set dma_mask to point to coherent_dma_mask
Platform devices created by DT code don't initialize dma_mask pointer to anything. Set it to coherent_dma_mask by default if the architecture code has not set it. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/platform.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 9b439ac63d8e..c005495fa382 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -216,6 +216,8 @@ static struct platform_device *of_platform_device_create_pdata(
216 dev->archdata.dma_mask = 0xffffffffUL; 216 dev->archdata.dma_mask = 0xffffffffUL;
217#endif 217#endif
218 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 218 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
219 if (!dev->dev.dma_mask)
220 dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
219 dev->dev.bus = &platform_bus_type; 221 dev->dev.bus = &platform_bus_type;
220 dev->dev.platform_data = platform_data; 222 dev->dev.platform_data = platform_data;
221 223