diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2006-11-18 17:15:30 +0100 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-04-14 15:20:20 +0200 |
commit | c841beeddebece0039e724fb27f4d1a39ee1c6b6 (patch) | |
tree | fcfc4a6879154130b2bfd0167de0cc49554afede /lib_avr32/board.c | |
parent | 6c9ba919375db977aaad9146bf320c7afd07ae7a (diff) | |
download | u-boot-imx-c841beeddebece0039e724fb27f4d1a39ee1c6b6.zip u-boot-imx-c841beeddebece0039e724fb27f4d1a39ee1c6b6.tar.gz u-boot-imx-c841beeddebece0039e724fb27f4d1a39ee1c6b6.tar.bz2 |
AVR32: Split start_u_boot into board_init_f and board_init_r
Split the avr32 initialization code into a function to run before
relocation, board_init_f and a function to run after relocation,
board_init_r. For now, board_init_f simply calls board_init_r
at the end.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'lib_avr32/board.c')
-rw-r--r-- | lib_avr32/board.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib_avr32/board.c b/lib_avr32/board.c index 02c106b..c531eef 100644 --- a/lib_avr32/board.c +++ b/lib_avr32/board.c @@ -122,7 +122,7 @@ static void display_flash_config (void) printf("at address 0x%08lx\n", gd->bd->bi_flashstart); } -void start_u_boot (void) +void board_init_f(ulong unused) { gd_t gd_data; @@ -130,8 +130,6 @@ void start_u_boot (void) memset(&gd_data, 0, sizeof(gd_data)); gd = &gd_data; - monitor_flash_len = _edata - _text; - /* Perform initialization sequence */ cpu_init(); timer_init(); @@ -140,10 +138,18 @@ void start_u_boot (void) serial_init(); console_init_f(); display_banner(); - board_init_memories(); - mem_malloc_init(); + board_init_r(gd, CFG_MONITOR_BASE); +} + +void board_init_r(gd_t *new_gd, ulong dest_addr) +{ + gd = new_gd; + + monitor_flash_len = _edata - _text; + + mem_malloc_init(); gd->bd = malloc(sizeof(bd_t)); memset(gd->bd, 0, sizeof(bd_t)); gd->bd->bi_baudrate = gd->baudrate; |