]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
avr32: use board_early_init_r instead of board_init_info
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Sun, 31 Aug 2008 16:46:35 +0000 (18:46 +0200)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Mon, 1 Sep 2008 12:21:35 +0000 (14:21 +0200)
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>
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
board/earthlcd/favr-32-ezkit/favr-32-ezkit.c
board/mimc/mimc200/mimc200.c
board/miromico/hammerhead/hammerhead.c
include/asm-avr32/initcalls.h
lib_avr32/board.c

index 03544aa211b355bb3f7a7b68b2b1c9054feca06a..480d5255fde49c4b4742d22e95c3c02439d918e7 100644 (file)
@@ -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);
index cc400a92f8a897fd34ce5a0d1653e6baefdb425c..7be39931e5e20e2462b726c6d40d494535e31d2d 100644 (file)
@@ -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);
index b2ddd089d79397c26291506778f1e2032be67ea4..d53ca4c13d3a22c7a9b49fc4be86d7d444bdab96 100644 (file)
@@ -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)
index 4da467860e1545ea36c32b3d5229bf1b503811b4..c30bcb6d32b1565fcec8aab2f57c480c75c44bba 100644 (file)
@@ -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 */
index 8670527891eda4e03f8e3f55170c7e2158e9c764..7fd078125424d1b029d188733f29f1a522bae57c 100644 (file)
@@ -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)
index 583e5dc1010415a29991df3925b9baaba97b47c0..57a278b6a18b1d811f5a86e75d6911d28ab4c087 100644 (file)
@@ -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__ */
index 19d76d2cacc1b9a64a4733dd01d914f44ca6e17b..4ed6c966306722b1ba35c3382e09e23de876a26a 100644 (file)
@@ -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();