aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-10-30 00:36:46 -0400
committerFugang Duan <b38611@freescale.com>2014-06-13 01:46:35 -0400
commit9d1bb4f767a25dbcc35d5c7aa7b92a364566eb53 (patch)
tree6767e14ddb935439fbf465e6e05df57b153083e6
parent8978cf98adf987132974864dd4b8a2778a91acd3 (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>
-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 e0a6514ab46c..96cabfd60a6b 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -215,6 +215,8 @@ struct platform_device *of_platform_device_create_pdata(
215 dev->archdata.dma_mask = 0xffffffffUL; 215 dev->archdata.dma_mask = 0xffffffffUL;
216#endif 216#endif
217 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 217 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
218 if (!dev->dev.dma_mask)
219 dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
218 dev->dev.bus = &platform_bus_type; 220 dev->dev.bus = &platform_bus_type;
219 dev->dev.platform_data = platform_data; 221 dev->dev.platform_data = platform_data;
220 222