diff options
| author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-01-08 10:18:02 +0000 | 
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-01-08 22:14:50 +0100 | 
| commit | e05e5de7fae5bec79617e113916dac6631251156 (patch) | |
| tree | c4d2bedca6e1ec79e30b229d2da6b979276456af /arch/arm/lib/board.c | |
| parent | 7528cf5f016b5b8b8b12b373f6f31a10bf89233d (diff) | |
| download | olio-uboot-2014.01-e05e5de7fae5bec79617e113916dac6631251156.tar.xz olio-uboot-2014.01-e05e5de7fae5bec79617e113916dac6631251156.zip | |
arm: move C runtime setup code in crt0.S
Move all the C runtime setup code from every start.S
in arch/arm into arch/arm/lib/crt0.S. This covers
the code sequence from setting up the initial stack
to calling into board_init_r().
Also, rewrite the C runtime setup and make functions
board_init_*() and relocate_code() behave according to
normal C semantics (no jumping across the C stack any
more, etc).
Some SPL targets had to be touched because they use
start.S explicitly or for some reason; the relevant
maintainers and custodians are cc:ed.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Diffstat (limited to 'arch/arm/lib/board.c')
| -rw-r--r-- | arch/arm/lib/board.c | 11 | 
1 files changed, 0 insertions, 11 deletions
| diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index e0cb6353a..0459d0ce9 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -279,11 +279,6 @@ void board_init_f(ulong bootflag)  	bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_F, "board_init_f"); -	/* Pointer is writable since we allocated a register for it */ -	gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07); -	/* compiler optimization barrier needed for GCC >= 3.4 */ -	__asm__ __volatile__("": : :"memory"); -  	memset((void *)gd, 0, sizeof(gd_t));  	gd->mon_len = _bss_end_ofs; @@ -465,10 +460,6 @@ void board_init_f(ulong bootflag)  		gd->fdt_blob = new_fdt;  	}  	memcpy(id, (void *)gd, sizeof(gd_t)); - -	relocate_code(addr_sp, id, addr); - -	/* NOTREACHED - relocate_code() does not return */  }  #if !defined(CONFIG_SYS_NO_FLASH) @@ -493,8 +484,6 @@ void board_init_r(gd_t *id, ulong dest_addr)  	ulong flash_size;  #endif -	gd = id; -  	gd->flags |= GD_FLG_RELOC;	/* tell others: relocation done */  	bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r"); |