diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-08-31 18:46:35 +0200 | 
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-09-01 14:21:35 +0200 | 
| commit | 25e6854d42c11046a468576179b5494f850311b2 (patch) | |
| tree | 8d082bde626cae091c6d3f8b0b18d7f3d32ed08b | |
| parent | 36d375faf5cff98e8dca32aabbbb1ec6036437dd (diff) | |
| download | olio-uboot-2014.01-25e6854d42c11046a468576179b5494f850311b2.tar.xz olio-uboot-2014.01-25e6854d42c11046a468576179b5494f850311b2.zip | |
avr32: use board_early_init_r instead of board_init_info
Replace the avr32-specific board_init_info hook by the standard
board_early_init_r hook and make it optional.
board_early_init_r() runs somewhat earlier than board_init_info used to
do, but this isn't a problem for any of the in-tree boards.
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
| -rw-r--r-- | board/atmel/atngw100/atngw100.c | 3 | ||||
| -rw-r--r-- | board/atmel/atstk1000/atstk1000.c | 3 | ||||
| -rw-r--r-- | board/earthlcd/favr-32-ezkit/favr-32-ezkit.c | 3 | ||||
| -rw-r--r-- | board/mimc/mimc200/mimc200.c | 3 | ||||
| -rw-r--r-- | board/miromico/hammerhead/hammerhead.c | 3 | ||||
| -rw-r--r-- | include/asm-avr32/initcalls.h | 1 | ||||
| -rw-r--r-- | lib_avr32/board.c | 4 | 
7 files changed, 13 insertions, 7 deletions
| diff --git a/board/atmel/atngw100/atngw100.c b/board/atmel/atngw100/atngw100.c index 03544aa21..480d5255f 100644 --- a/board/atmel/atngw100/atngw100.c +++ b/board/atmel/atngw100/atngw100.c @@ -88,10 +88,11 @@ phys_size_t initdram(int board_type)  	return actual_size;  } -void board_init_info(void) +int board_early_init_r(void)  {  	gd->bd->bi_phy_id[0] = 0x01;  	gd->bd->bi_phy_id[1] = 0x03; +	return 0;  }  extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); diff --git a/board/atmel/atstk1000/atstk1000.c b/board/atmel/atstk1000/atstk1000.c index cc400a92f..7be39931e 100644 --- a/board/atmel/atstk1000/atstk1000.c +++ b/board/atmel/atstk1000/atstk1000.c @@ -110,10 +110,11 @@ phys_size_t initdram(int board_type)  	return actual_size;  } -void board_init_info(void) +int board_early_init_r(void)  {  	gd->bd->bi_phy_id[0] = 0x10;  	gd->bd->bi_phy_id[1] = 0x11; +	return 0;  }  extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); diff --git a/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c b/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c index b2ddd089d..d53ca4c13 100644 --- a/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c +++ b/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c @@ -81,9 +81,10 @@ phys_size_t initdram(int board_type)  	return actual_size;  } -void board_init_info(void) +int board_early_init_r(void)  {  	gd->bd->bi_phy_id[0] = 0x01; +	return 0;  }  #if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET) diff --git a/board/mimc/mimc200/mimc200.c b/board/mimc/mimc200/mimc200.c index 4da467860..c30bcb6d3 100644 --- a/board/mimc/mimc200/mimc200.c +++ b/board/mimc/mimc200/mimc200.c @@ -124,10 +124,11 @@ phys_size_t initdram(int board_type)  	return actual_size;  } -void board_init_info(void) +int board_early_init_r(void)  {  	gd->bd->bi_phy_id[0] = 0x01;  	gd->bd->bi_phy_id[1] = 0x03; +	return 0;  }  /* SPI chip select control */ diff --git a/board/miromico/hammerhead/hammerhead.c b/board/miromico/hammerhead/hammerhead.c index 867052789..7fd078125 100644 --- a/board/miromico/hammerhead/hammerhead.c +++ b/board/miromico/hammerhead/hammerhead.c @@ -95,9 +95,10 @@ phys_size_t initdram(int board_type)  	return actual_size;  } -void board_init_info(void) +int board_early_init_r(void)  {  	gd->bd->bi_phy_id[0] = 0x01; +	return 0;  }  int board_postclk_init(void) diff --git a/include/asm-avr32/initcalls.h b/include/asm-avr32/initcalls.h index 583e5dc10..57a278b6a 100644 --- a/include/asm-avr32/initcalls.h +++ b/include/asm-avr32/initcalls.h @@ -26,6 +26,5 @@  extern int cpu_init(void);  extern int timer_init(void); -extern void board_init_info(void);  #endif /* __ASM_AVR32_INITCALLS_H__ */ diff --git a/lib_avr32/board.c b/lib_avr32/board.c index 19d76d2ca..4ed6c9663 100644 --- a/lib_avr32/board.c +++ b/lib_avr32/board.c @@ -53,6 +53,7 @@ static int __do_nothing(void)  	return 0;  }  int board_postclk_init(void) __attribute__((weak, alias("__do_nothing"))); +int board_early_init_r(void) __attribute__((weak, alias("__do_nothing")));  /* The malloc area is right below the monitor image in RAM */  static void mem_malloc_init(void) @@ -282,6 +283,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)  	gd->flags |= GD_FLG_RELOC;  	gd->reloc_off = dest_addr - CFG_MONITOR_BASE; +	board_early_init_r(); +  	monitor_flash_len = _edata - _text;  	/* @@ -318,7 +321,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)  	mem_malloc_init();  	malloc_bin_reloc();  	dma_alloc_init(); -	board_init_info();  	enable_interrupts(); |