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 03/10] xilinx: Add DDR base address to bootscript address
Date: Thu, 22 Oct 2020 12:32:15 +0200	[thread overview]
Message-ID: <6e5a4a0e7954ca693660e40127baed9547660309.1603362738.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1603362738.git.michal.simek@xilinx.com>

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

Add ram base address to scriptaddr env variable to make boot
script address to be a valid address when ddr base address changes.

This works properly if the first memory region is the region where uboot
runs. Also the solution was taken in respect of a lot of jtag script
putting u-boot script to certain address. For standard cases
bd->bi_dram[0].start is 0 all the time. Only for systems with DDR placed
out of this location it does calculation.

This is not the best solution and should be done differently in future but
enough for now till we don't have full solution ready yet.

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

 board/xilinx/common/board.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 821ee836dd84..857a66a50407 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -371,6 +371,15 @@ 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 (bd->bi_dram[0].start) {
+		ulong scriptaddr;
+
+		scriptaddr = env_get_hex("scriptaddr", 0);
+		ret |= env_set_hex("scriptaddr",
+				   bd->bi_dram[0].start + scriptaddr);
+	}
 
 	if (CONFIG_IS_ENABLED(ARCH_ZYNQ))
 		bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M));
-- 
2.28.0

  parent reply	other threads:[~2020-10-22 10:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
2020-10-22 10:32 ` [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency Michal Simek
2020-10-22 10:32 ` [PATCH 02/10] xilinx: common: Protect board_late_init_xilinx() Michal Simek
2020-10-22 10:32 ` Michal Simek [this message]
2020-10-22 10:32 ` [PATCH 04/10] xilinx: Enable FRU command for all ARM based platforms Michal Simek
2020-10-22 10:32 ` [PATCH 05/10] xilinx: zynq: Change types from u32 to uint32_t Michal Simek
2020-10-22 10:32 ` [PATCH 06/10] xilinx: zynq: Enable AES command Michal Simek
2020-10-22 10:32 ` [PATCH 07/10] xilinx: Enable SF_TEST command for all ARM based platforms Michal Simek
2020-10-22 10:32 ` [PATCH 08/10] xilinx: Remove additional newline in config files Michal Simek
2020-10-22 10:32 ` [PATCH 09/10] xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM Michal Simek
2020-10-22 10:32 ` [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible Michal Simek
2020-10-22 17:45   ` Tom Rini
2020-10-23  5:43     ` Michal Simek
2020-10-27  7:29       ` Michal Simek
2020-10-27  7:27 ` [PATCH 00/10] xilinx: common: Several minor fixups 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=6e5a4a0e7954ca693660e40127baed9547660309.1603362738.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.