提交 107cc2c4 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

staging: vchiq: Use the old dma controller for OF config on platform devices

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

vchiq on Pi4 is no longer under the soc node, therefore it
doesn't get the dma-ranges for the VPU.

Switch to using the configuration of the old dma controller as
that will set the dma-ranges correctly.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 dd0c2d01
...@@ -2694,6 +2694,7 @@ vchiq_register_child(struct platform_device *pdev, const char *name) ...@@ -2694,6 +2694,7 @@ vchiq_register_child(struct platform_device *pdev, const char *name)
{ {
struct platform_device_info pdevinfo; struct platform_device_info pdevinfo;
struct platform_device *child; struct platform_device *child;
struct device_node *np;
memset(&pdevinfo, 0, sizeof(pdevinfo)); memset(&pdevinfo, 0, sizeof(pdevinfo));
...@@ -2709,10 +2710,20 @@ vchiq_register_child(struct platform_device *pdev, const char *name) ...@@ -2709,10 +2710,20 @@ vchiq_register_child(struct platform_device *pdev, const char *name)
} }
/* /*
* We want the dma-ranges etc to be copied from the parent VCHIQ device * We want the dma-ranges etc to be copied from a device with the
* to be passed on to the children too. * correct dma-ranges for the VPU.
* VCHIQ on Pi4 is now under scb which doesn't get those dma-ranges.
* Take the "dma" node as going to be suitable as it sees the world
* through the same eyes as the VPU.
*/ */
of_dma_configure(&new_dev->dev, pdev->dev.of_node, true); np = of_find_node_by_path("dma");
if (!np)
np = pdev->dev.of_node;
of_dma_configure(&child->dev, np, true);
if (np != pdev->dev.of_node)
of_node_put(np);
return child; return child;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册