[PATCH 2/3] raspi: override properties in /reserved-memory node of device tree

Jonas Richardsen jonasrichardsen at emlix.com
Mon Apr 22 03:16:48 PDT 2024


Previously, the fixups in rpi-common.c only tries to copy the
`/reserved-memory` node from the video core. As explained in
`bcm2711-rpi.dtsi`, line 58, the video core does only update the
placement information of the `/reserved-memory/nvram at 0` subnode:
> /*
>  * RPi4's co-processor will copy the board's bootloader configuration
>  * into memory for the OS to consume. It'll also update this node with
>  * its placement information.
>  */
This behaviour is not achieved by the previous fixup, as this fixup
operates on the wrong node and, even if applied to
"/reserved-memory/nvram at 0" would not override the already existing
properties of this node. Instead, we can use the previously added
`register_vc_property_fixup` method to achieve the desired behaviour.

Signed-off-by: Jonas Richardsen <jonasrichardsen at emlix.com>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 2245c36cbe..3c685852d3 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -372,7 +372,8 @@ static void rpi_vc_fdt_parse(struct device_node *root)
 
 	register_vc_fixup(root, "/system");
 	register_vc_fixup(root, "/axi");
-	register_vc_fixup(root, "/reserved-memory");
+	register_vc_property_fixup(root, "/reserved-memory/nvram at 0", "reg");
+	register_vc_property_fixup(root, "/reserved-memory/nvram at 0", "status");
 	register_vc_fixup(root, "/hat");
 	register_vc_fixup(root, "/chosen/bootloader");
 	chosen = register_vc_fixup(root, "/chosen");
-- 
2.42.0




More information about the barebox mailing list