提交 0589342c 编写于 作者: R Rob Herring

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: NRob Herring <rob.herring@calxeda.com>
上级 13ccacd5
...@@ -216,6 +216,8 @@ static struct platform_device *of_platform_device_create_pdata( ...@@ -216,6 +216,8 @@ static struct platform_device *of_platform_device_create_pdata(
dev->archdata.dma_mask = 0xffffffffUL; dev->archdata.dma_mask = 0xffffffffUL;
#endif #endif
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
if (!dev->dev.dma_mask)
dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
dev->dev.bus = &platform_bus_type; dev->dev.bus = &platform_bus_type;
dev->dev.platform_data = platform_data; dev->dev.platform_data = platform_data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册