summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2019-09-25 10:11:48 +0300
committerMichal Simek <michal.simek@xilinx.com>2019-10-08 10:55:11 +0300
commita750ded4667496b367bc1275246752a3092b2ca2 (patch)
treec4dab1235acf4595b25e32cd24997bbfbef0bd07 /common
parent9d877c2f5404be82d90e8bc624a20a35d21e429d (diff)
downloadu-boot-a750ded4667496b367bc1275246752a3092b2ca2.tar.xz
microblaze: Fix lmb memory initialization
Microblaze as Arm is using multiple memory banks which are read from DT that's why there is a need to initialized LMB based on bd->bi_dram[]. Without this fix memory base/size is all the time 0 and image relocation is not possible. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'common')
-rw-r--r--common/image.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/image.c b/common/image.c
index 179eef0bd2..fc0ebe338b 100644
--- a/common/image.c
+++ b/common/image.c
@@ -582,7 +582,7 @@ ulong env_get_bootm_low(void)
#if defined(CONFIG_SYS_SDRAM_BASE)
return CONFIG_SYS_SDRAM_BASE;
-#elif defined(CONFIG_ARM)
+#elif defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)
return gd->bd->bi_dram[0].start;
#else
return 0;
@@ -599,7 +599,8 @@ phys_size_t env_get_bootm_size(void)
return tmp;
}
-#if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
+#if (defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)) && \
+ defined(CONFIG_NR_DRAM_BANKS)
start = gd->bd->bi_dram[0].start;
size = gd->bd->bi_dram[0].size;
#else