All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pierre-Clément Tosi" <ptosi@google.com>
To: u-boot@lists.denx.de
Cc: "Pierre-Clément Tosi" <ptosi@google.com>,
	"Simon Glass" <sjg@chromium.org>
Subject: [PATCH] board_r: Relocate OF_EMBED if NEEDS_MANUAL_RELOC only
Date: Fri,  9 Sep 2022 21:16:18 +0100	[thread overview]
Message-ID: <20220909201618.1660198-1-ptosi@google.com> (raw)

When the embedded device tree is pointed to by the __dtb_dt_*begin
symbols, it seems to be covered by the early relocation code and doesn't
need to be manually patched.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
---
 common/board_r.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/board_r.c b/common/board_r.c
index 56eb60fa27..00926dcb1e 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -150,13 +150,13 @@ static int initr_reloc_global_data(void)
 	 */
 	gd->env_addr += gd->reloc_off;
 #endif
-#ifdef CONFIG_OF_EMBED
 	/*
 	 * The fdt_blob needs to be moved to new relocation address
 	 * incase of FDT blob is embedded with in image
 	 */
-	gd->fdt_blob += gd->reloc_off;
-#endif
+	if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC))
+		gd->fdt_blob += gd->reloc_off;
+
 #ifdef CONFIG_EFI_LOADER
 	/*
 	 * On the ARM architecture gd is mapped to a fixed register (r9 or x18).
-- 
2.37.2.789.g6183377224-goog


             reply	other threads:[~2022-09-09 20:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 20:16 Pierre-Clément Tosi [this message]
2022-09-29 20:07 ` [PATCH] board_r: Relocate OF_EMBED if NEEDS_MANUAL_RELOC only Tom Rini
2023-03-15 19:24   ` Ajay Kaher
2023-03-15 19:42     ` Simon Glass
2023-03-16  5:51       ` Ajay Kaher
2023-03-16 19:25     ` Tom Rini

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=20220909201618.1660198-1-ptosi@google.com \
    --to=ptosi@google.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.