From patchwork Tue Mar 8 13:40:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot] microblaze: Setup monitor_flash_len Date: Tue, 08 Mar 2011 03:40:12 -0000 From: Michal Simek X-Patchwork-Id: 86005 Message-Id: <1299591612-15614-1-git-send-email-monstr@monstr.eu> To: u-boot@lists.denx.de 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 --- 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