bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0473-staging-vchiq_arm-children-inherit-DMA-config.patch
1 From dad69811fe68eade1b9899efd0186402f65742e0 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 21 Jul 2020 17:34:09 +0100
4 Subject: [PATCH] staging: vchiq_arm: children inherit DMA config
5
6 Although it is no longer necessary for vchiq's children to have a
7 different DMA configuration to the parent, they do still need to
8 explicitly to have their DMA configuration set - to be that of the
9 parent.
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
12 ---
13 .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 ++++++++++
14 1 file changed, 10 insertions(+)
15
16 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
17 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
18 @@ -1864,8 +1864,18 @@ vchiq_register_child(struct platform_dev
19
20 child->dev.of_node = np;
21
22 + /*
23 + * We want the dma-ranges etc to be copied from the parent VCHIQ device
24 + * to be passed on to the children without a node of their own.
25 + */
26 + if (!np)
27 + np = pdev->dev.of_node;
28 +
29 of_dma_configure(&child->dev, np, true);
30
31 + if (np != pdev->dev.of_node)
32 + of_node_put(np);
33 +
34 return child;
35 }
36