diff mbox

[U-Boot,03/10] microblaze: Support flashes on lower addresses

Message ID 1314779721-1113-4-git-send-email-monstr@monstr.eu
State Changes Requested
Headers show

Commit Message

Michal Simek Aug. 31, 2011, 8:35 a.m. UTC
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/lib/board.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Comments

Mike Frysinger Aug. 31, 2011, 7:18 p.m. UTC | #1
On Wednesday, August 31, 2011 04:35:14 Michal Simek wrote:
> +extern char *__end;
> +extern char *__text_start;

if you're referring to symbols provided by a linker script, you should do:
	extern char __end[];
-mike
Michal Simek Sept. 1, 2011, 12:55 p.m. UTC | #2
Mike Frysinger wrote:
> On Wednesday, August 31, 2011 04:35:14 Michal Simek wrote:
>> +extern char *__end;
>> +extern char *__text_start;
> 
> if you're referring to symbols provided by a linker script, you should do:
> 	extern char __end[];

fixed.


Thanks,
Michal
Wolfgang Denk Sept. 7, 2011, 9:01 p.m. UTC | #3
Dear Michal Simek,

In message <1314779721-1113-4-git-send-email-monstr@monstr.eu> you wrote:
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
>  arch/microblaze/lib/board.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
> index 5510c12..ab1cbab 100644
> --- a/arch/microblaze/lib/board.c
> +++ b/arch/microblaze/lib/board.c
> @@ -84,6 +84,10 @@ init_fnc_t *init_sequence[] = {
>  	NULL,
>  };
>  
> +unsigned long monitor_flash_len;
> +extern char *__end;
> +extern char *__text_start;

WARNING: externs should be avoided in .c files


Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 5510c12..ab1cbab 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -84,6 +84,10 @@  init_fnc_t *init_sequence[] = {
 	NULL,
 };
 
+unsigned long monitor_flash_len;
+extern char *__end;
+extern char *__text_start;
+
 void board_init (void)
 {
 	bd_t *bd;
@@ -105,6 +109,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