aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2020-04-01 06:01:21 -0600
committerMichal Simek <michal.simek@xilinx.com>2020-10-27 08:13:33 +0100
commitd388cedd466ade3265490be841bd24a1ad8539af (patch)
tree49d44172ca395eab922d961bd2476e07badc112c /board
parentd93fbac512a44bd05bae9db5834b22945911d70c (diff)
downloadu-boot-d388cedd466ade3265490be841bd24a1ad8539af.zip
u-boot-d388cedd466ade3265490be841bd24a1ad8539af.tar.gz
u-boot-d388cedd466ade3265490be841bd24a1ad8539af.tar.bz2
xilinx: Add DDR base address to bootscript address
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>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/common/board.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 821ee83..857a66a 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));