Patchwork [U-Boot] microblaze: Setup monitor_flash_len

login
register
mail settings
Submitter Michal Simek
Date March 8, 2011, 1:40 p.m.
Message ID <1299591612-15614-1-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/86005/
State Superseded
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - March 8, 2011, 1:40 p.m.
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@monstr.eu>
---
 arch/microblaze/lib/board.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Patch

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