提交 877e86f2 编写于 作者: A Andy Shevchenko 提交者: Vinod Koul

dw_dmac: apply default dma_mask if needed

In some cases we got the device without dma_mask configured. We have to apply
the default value to avoid crashes during memory mapping.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 a20702b8
......@@ -1661,6 +1661,12 @@ static int dw_probe(struct platform_device *pdev)
if (!regs)
return -EBUSY;
/* Apply default dma_mask if needed */
if (!pdev->dev.dma_mask) {
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
}
dw_params = dma_read_byaddr(regs, DW_PARAMS);
autocfg = dw_params >> DW_PARAMS_EN & 0x1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册