All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [PATCH] xilinx: common: Fix boot script address
Date: Tue,  6 Apr 2021 08:52:39 +0200	[thread overview]
Message-ID: <5dc590fbc134e96437b195bc18a45f5caa18535c.1617691957.git.michal.simek@xilinx.com> (raw)

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

Currently u-boot supports addresses upto 39-bits only. If anybody
wants to use addresses of more than 39-bits in Linux they will have
a separate memory node in DT. In such cases they will have multiple
memory nodes.
Currently u-boot selects and runs on lower memory bank region.
But bootscript is being loaded on dram bank 0, where dram bank 0 will
point to 1st memory node in DT. If first memory node is mentioned as
higher ddr(>39-bits address) then u-boot cannot load the bootscript.
So fix this issue by setting bootscript address within the lower memory
bank region.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/common/board.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 475628b92549..92b61d83ca47 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -378,14 +378,12 @@ int board_late_init_xilinx(void)
 	int i, id, macid = 0;
 	struct xilinx_board_description *desc;
 	phys_size_t bootm_size = gd->ram_size;
-	struct bd_info *bd = gd->bd;
 
-	if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) {
+	if (!CONFIG_IS_ENABLED(MICROBLAZE)) {
 		ulong scriptaddr;
 
 		scriptaddr = env_get_hex("scriptaddr", 0);
-		ret |= env_set_hex("scriptaddr",
-				   bd->bi_dram[0].start + scriptaddr);
+		ret |= env_set_hex("scriptaddr", gd->ram_base + scriptaddr);
 	}
 
 	if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE))
-- 
2.31.0

             reply	other threads:[~2021-04-06  6:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  6:52 Michal Simek [this message]
2021-04-23  6:46 ` [PATCH] xilinx: common: Fix boot script address Michal Simek

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=5dc590fbc134e96437b195bc18a45f5caa18535c.1617691957.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --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.