ImmortalWrt/target/linux/bcm27xx/patches-5.15/950-0473-staging-vchiq_arm-children-inherit-DMA-config.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

37 lines
1.1 KiB
Diff

From dad69811fe68eade1b9899efd0186402f65742e0 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 21 Jul 2020 17:34:09 +0100
Subject: [PATCH] staging: vchiq_arm: children inherit DMA config
Although it is no longer necessary for vchiq's children to have a
different DMA configuration to the parent, they do still need to
explicitly to have their DMA configuration set - to be that of the
parent.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -1864,8 +1864,18 @@ vchiq_register_child(struct platform_dev
child->dev.of_node = np;
+ /*
+ * We want the dma-ranges etc to be copied from the parent VCHIQ device
+ * to be passed on to the children without a node of their own.
+ */
+ 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;
}