mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jonas Richardsen <jonasrichardsen@emlix.com>
To: barebox@lists.infradead.org
Cc: Jonas Richardsen <jonasrichardsen@emlix.com>
Subject: [PATCH 2/3] raspi: override properties in /reserved-memory node of device tree
Date: Mon, 22 Apr 2024 10:16:48 +0000	[thread overview]
Message-ID: <20240422102232.551842-3-jonasrichardsen@emlix.com> (raw)
In-Reply-To: <20240422102232.551842-1-jonasrichardsen@emlix.com>

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@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@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@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@0", "reg");
+	register_vc_property_fixup(root, "/reserved-memory/nvram@0", "status");
 	register_vc_fixup(root, "/hat");
 	register_vc_fixup(root, "/chosen/bootloader");
 	chosen = register_vc_fixup(root, "/chosen");
-- 
2.42.0




  parent reply	other threads:[~2024-04-22 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 10:16 [PATCH 0/3] raspi: cleanup of vc fixups Jonas Richardsen
2024-04-22 10:16 ` [PATCH 1/3] raspi: add fixup method for specific properties Jonas Richardsen
2024-04-22 10:16 ` Jonas Richardsen [this message]
2024-04-22 10:16 ` [PATCH 3/3] raspi: add a fixup for the `dma-ranges` property of the `/emmc2bus` dt node Jonas Richardsen
2024-04-23  8:34 ` [PATCH 0/3] raspi: cleanup of vc fixups Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240422102232.551842-3-jonasrichardsen@emlix.com \
    --to=jonasrichardsen@emlix.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox