diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-04 22:53:41 +0400 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-16 02:32:33 +0400 |
commit | de30122bb58fee7b0f94bcfabab595b6ad757336 (patch) | |
tree | e109b8799a2fe97e49424bec56cbe448154d1dd4 /arch | |
parent | 50a47d0523e8efebe912bef539a77ffd42116451 (diff) | |
download | u-boot-de30122bb58fee7b0f94bcfabab595b6ad757336.tar.xz |
net: move bootfile init into eth_initialize
All arches init this the same way, so move the logic into the core
net code to avoid duplicating it everywhere else.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/lib/board.c | 8 | ||||
-rw-r--r-- | arch/avr32/lib/board.c | 3 | ||||
-rw-r--r-- | arch/blackfin/lib/board.c | 7 | ||||
-rw-r--r-- | arch/m68k/lib/board.c | 5 | ||||
-rw-r--r-- | arch/microblaze/lib/board.c | 4 | ||||
-rw-r--r-- | arch/mips/lib/board.c | 8 | ||||
-rw-r--r-- | arch/nds32/lib/board.c | 6 | ||||
-rw-r--r-- | arch/powerpc/lib/board.c | 8 | ||||
-rw-r--r-- | arch/sh/lib/board.c | 11 | ||||
-rw-r--r-- | arch/sparc/lib/board.c | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/init_helpers.h | 1 | ||||
-rw-r--r-- | arch/x86/lib/board.c | 3 | ||||
-rw-r--r-- | arch/x86/lib/init_helpers.c | 12 |
13 files changed, 3 insertions, 78 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 66dfb13fa8..024646cae5 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -592,14 +592,6 @@ void board_init_r(gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - { - char *s = getenv("bootfile"); - - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - } -#endif #ifdef CONFIG_BOARD_LATE_INIT board_late_init(); diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index 3c2d0fb8b0..b390a6c8f8 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -327,9 +327,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) bb_miiphy_init(); #endif #if defined(CONFIG_CMD_NET) - s = getenv("bootfile"); - if (s) - copy_filename(BootFile, s, sizeof(BootFile)); puts("Net: "); eth_initialize(gd->bd); #endif diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 373b9346c0..c380d271e7 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -319,13 +319,8 @@ static void board_net_init_r(bd_t *bd) bb_miiphy_init(); #endif #ifdef CONFIG_CMD_NET - char *s; - - if ((s = getenv("bootfile")) != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - printf("Net: "); - eth_initialize(gd->bd); + eth_initialize(bd); #endif } diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index ffd91a83fe..65a8595c2b 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -559,11 +559,6 @@ void board_init_r (gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - if ((s = getenv ("bootfile")) != NULL) { - copy_filename (BootFile, s, sizeof (BootFile)); - } -#endif WATCHDOG_RESET (); diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index beb406d6c8..f3679d536b 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -182,10 +182,6 @@ void board_init (void) uchar enetaddr[6]; eth_getenv_enetaddr("ethaddr", enetaddr); printf("MAC: %pM\n", enetaddr); - - s = getenv("bootfile"); - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); #endif /* main_loop */ diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index 84e55f2102..59a80011da 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -339,14 +339,6 @@ void board_init_r(gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - { - char *s = getenv("bootfile"); - - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - } -#endif #ifdef CONFIG_CMD_SPI puts("SPI: "); diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c index 50ea30d3b0..7121313a83 100644 --- a/arch/nds32/lib/board.c +++ b/arch/nds32/lib/board.c @@ -399,12 +399,6 @@ void board_init_r(gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - s = getenv("bootfile"); - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); -#endif - #ifdef BOARD_LATE_INIT board_late_init(); #endif diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 7daffcec3a..fea310eedd 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -932,14 +932,6 @@ void board_init_r(gd_t *id, ulong dest_addr) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - { - char *s = getenv("bootfile"); - - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - } -#endif WATCHDOG_RESET(); diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index d71cca4465..34d7881f44 100644 --- a/arch/sh/lib/board.c +++ b/arch/sh/lib/board.c @@ -190,15 +190,8 @@ void sh_generic_init(void) bb_miiphy_init(); #endif #if defined(CONFIG_CMD_NET) - { - char *s; - puts("Net: "); - eth_initialize(gd->bd); - - s = getenv("bootfile"); - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - } + puts("Net: "); + eth_initialize(gd->bd); #endif /* CONFIG_CMD_NET */ while (1) { diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index 9faf88bf22..7e48775dfe 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -357,11 +357,6 @@ void board_init_f(ulong bootflag) /* Initialize from environment */ load_addr = getenv_ulong("loadaddr", 16, load_addr); -#if defined(CONFIG_CMD_NET) - if ((s = getenv("bootfile")) != NULL) { - copy_filename(BootFile, s, sizeof(BootFile)); - } -#endif /* CONFIG_CMD_NET */ WATCHDOG_RESET(); diff --git a/arch/x86/include/asm/init_helpers.h b/arch/x86/include/asm/init_helpers.h index 8d2e0bae2f..8afb443290 100644 --- a/arch/x86/include/asm/init_helpers.h +++ b/arch/x86/include/asm/init_helpers.h @@ -37,7 +37,6 @@ int mem_malloc_init_r(void); int init_bd_struct_r(void); int flash_init_r(void); int status_led_set_r(void); -int set_bootfile_r(void); int set_load_addr_r(void); #endif /* !_INIT_HELPERS_H_ */ diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 15b4ae2e71..90cf7fc888 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -177,9 +177,6 @@ init_fnc_t *init_sequence_r[] = { status_led_set_r, #endif set_load_addr_r, -#if defined(CONFIG_CMD_NET) - set_bootfile_r, -#endif #if defined(CONFIG_CMD_IDE) ide_init_r, #endif diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index a8741d0e63..9ec34ff992 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -188,18 +188,6 @@ int status_led_set_r(void) } #endif -int set_bootfile_r(void) -{ - char *s; - - s = getenv("bootfile"); - - if (s != NULL) - copy_filename(BootFile, s, sizeof(BootFile)); - - return 0; -} - int set_load_addr_r(void) { /* Initialize from environment */ |