summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-12-21 09:32:44 +0100
committerMichal Simek <monstr@monstr.eu>2011-01-10 08:52:32 +0100
commit1020286ef47bfa3b30430fbaa3f0dd464ff6eb9e (patch)
tree8e9592fa2a53b7090c0c283a90d8c859a32703fc /include
parent68e99e54e9e3e0c1b3b45929dc94c26932b851d5 (diff)
downloadu-boot-imx-1020286ef47bfa3b30430fbaa3f0dd464ff6eb9e.zip
u-boot-imx-1020286ef47bfa3b30430fbaa3f0dd464ff6eb9e.tar.gz
u-boot-imx-1020286ef47bfa3b30430fbaa3f0dd464ff6eb9e.tar.bz2
microblaze: Fix bd_info pointer
Patch "Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value" (sha1: 25ddd1fb0a2281b182529afbc8fda5de2dc16d96) introduce GENERATED_GBL_DATA_SIZE which is sizeof aligned gd_t (currently 0x40). Microblaze configs used 0x40(128) because this place also contained board info structure which lies on the top of ram. U-Boot is placed to the top of the ram (for example 0xd7ffffff) and bd structure was moved out of ram. This patch is fixing this scheme with GENERATED_BD_INFO_SIZE which swap global data and board info structures. For example: Current: gd 0xd7ffffc0, bd 0xd8000000 Fixed: gd 0xd7ffffc0, bd 0xd7ffff90 Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'include')
-rw-r--r--include/configs/microblaze-generic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 75e4e07..090ab3b 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -137,14 +137,14 @@
/* global pointer */
/* start of global data */
#define CONFIG_SYS_GBL_DATA_OFFSET \
- (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE \
- - GENERATED_GBL_DATA_SIZE)
+ (CONFIG_SYS_SDRAM_SIZE - GENERATED_GBL_DATA_SIZE)
/* monitor code */
#define SIZE 0x40000
-#define CONFIG_SYS_MONITOR_LEN (SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_MONITOR_LEN SIZE
#define CONFIG_SYS_MONITOR_BASE \
- (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN)
+ (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \
+ - CONFIG_SYS_MONITOR_LEN - GENERATED_BD_INFO_SIZE)
#define CONFIG_SYS_MONITOR_END \
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
#define CONFIG_SYS_MALLOC_LEN SIZE