/* 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();
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
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
}
/* 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 ();
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 */
/* 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: ");
/* 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
/* 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();
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) {
/* 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();
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_ */
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
}
#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 */
return 0;
}
+static void eth_env_init(bd_t *bis)
+{
+ const char *s;
+
+ if ((s = getenv("bootfile")) != NULL)
+ copy_filename(BootFile, s, sizeof(BootFile));
+}
+
int eth_initialize(bd_t *bis)
{
int num_devices = 0;
phy_init();
#endif
+ eth_env_init(bis);
+
/*
* If board-specific initialization exists, call it.
* If not, call a CPU-specific one