[U-Boot] [PATCH] microblaze: Setup monitor_flash_len
Michal Simek
monstr at monstr.eu
Tue Mar 8 14:40:12 CET 2011
Flash address on Microblaze systems could be on higher
addresses then ram. This patch fixed this assumption
and flash can be located on any address.
Signed-off-by: Michal Simek <monstr at monstr.eu>
---
arch/microblaze/lib/board.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index c5f7ac4..75d3c86 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -54,6 +54,12 @@ extern int timer_init (void);
extern void fsl_init2 (void);
#endif
+/* section symbols */
+extern char *__end;
+extern char *__text_start;
+
+unsigned long monitor_flash_len;
+
/*
* All attempts to come up with a "common" initialization sequence
* that works for all boards and architectures failed: some of the
@@ -107,6 +113,8 @@ void board_init (void)
bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
+ monitor_flash_len = __end - __text_start;
+
/*
* The Malloc area is immediately below the monitor copy in DRAM
* aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off
--
1.5.5.6
More information about the U-Boot
mailing list