u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
To: u-boot@lists.denx.de
Cc: Ricardo Salveti <ricardo@foundries.io>,
	Oleksandr Suvorov <oleksandr.suvorov@foundries.io>,
	"Ivan T. Ivanov" <iivanov@suse.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Matthias Brugger <mbrugger@suse.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Peter Robinson <pbrobinson@gmail.com>
Subject: [PATCH] board: rpi: always set fdt_addr if provided by firmware
Date: Sat, 25 Sep 2021 13:22:55 +0300	[thread overview]
Message-ID: <20210925102255.21620-1-oleksandr.suvorov@foundries.io> (raw)

From: Ricardo Salveti <ricardo@foundries.io>

Otherwise if the env gets saved with an incorrect or different
fdt_addr (by moving sdcard between different rpi versions), it won't
be able to boot with the correct address.

This allows fdt_addr to always be in sync with what gets set by the
firmware.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
---

 board/raspberrypi/rpi/rpi.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 372b26b6f2..e12f8c0c31 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -318,9 +318,6 @@ static void set_fdtfile(void)
  */
 static void set_fdt_addr(void)
 {
-	if (env_get("fdt_addr"))
-		return;
-
 	if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
 		return;
 
-- 
2.31.1


             reply	other threads:[~2021-09-25 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25 10:22 Oleksandr Suvorov [this message]
2021-09-27 12:01 ` [PATCH] board: rpi: always set fdt_addr if provided by firmware Matthias Brugger
2021-09-27 12:06   ` Oleksandr Suvorov

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=20210925102255.21620-1-oleksandr.suvorov@foundries.io \
    --to=oleksandr.suvorov@foundries.io \
    --cc=iivanov@suse.de \
    --cc=m.szyprowski@samsung.com \
    --cc=mbrugger@suse.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=pbrobinson@gmail.com \
    --cc=ricardo@foundries.io \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).