lib_*/board.c: do not initialize bi_enet*addr in global data

Since everyone is using the environment for mac address storage, there is
no point in seeding the global data.

The arches that are converted here:
	i386
	m68k
	microblaze
	mips
	nios
	nios2
	sh
	sparc

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Daniel Hellstrom <daniel@gaisler.com>
CC: Michal Simek <monstr@seznam.cz>
CC: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
Mike Frysinger 2009-02-11 18:27:18 -05:00 committed by Wolfgang Denk
parent 740e8ba7d4
commit 19b5b533cc
8 changed files with 0 additions and 110 deletions

View File

@ -262,23 +262,6 @@ void start_i386boot (void)
/* IP Address */ /* IP Address */
bd_data.bi_ip_addr = getenv_IPaddr ("ipaddr"); bd_data.bi_ip_addr = getenv_IPaddr ("ipaddr");
/* MAC Address */
{
int i;
ulong reg;
char *s, *e;
char tmp[64];
i = getenv_r ("ethaddr", tmp, sizeof (tmp));
s = (i > 0) ? tmp : NULL;
for (reg = 0; reg < 6; ++reg) {
bd_data.bi_enetaddr[reg] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
}
#if defined(CONFIG_PCI) #if defined(CONFIG_PCI)
/* /*
* Do pci configuration * Do pci configuration

View File

@ -584,44 +584,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
* where had to use getenv_r(), which can be pretty slow when * where had to use getenv_r(), which can be pretty slow when
* the environment is in EEPROM. * the environment is in EEPROM.
*/ */
s = getenv ("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#ifdef CONFIG_HAS_ETH1
/* handle the 2nd ethernet address */
s = getenv ("eth1addr");
for (i = 0; i < 6; ++i) {
bd->bi_enet1addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#endif
#ifdef CONFIG_HAS_ETH2
/* handle the 3rd ethernet address */
s = getenv ("eth2addr");
for (i = 0; i < 6; ++i) {
bd->bi_enet2addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#endif
#ifdef CONFIG_HAS_ETH3
/* handle 4th ethernet address */
s = getenv("eth3addr");
for (i = 0; i < 6; ++i) {
bd->bi_enet3addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#endif
/* IP Address */
bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
WATCHDOG_RESET (); WATCHDOG_RESET ();

View File

@ -173,14 +173,6 @@ void board_init (void)
#endif #endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
/* board MAC address */
s = getenv ("ethaddr");
printf ("MAC:%s\n",s);
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
/* IP Address */ /* IP Address */
bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
eth_init (bd); eth_init (bd);

View File

@ -401,14 +401,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
/* relocate environment function pointers etc. */ /* relocate environment function pointers etc. */
env_relocate(); env_relocate();
/* board MAC address */
s = getenv ("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
/* IP Address */ /* IP Address */
bd->bi_ip_addr = getenv_IPaddr("ipaddr"); bd->bi_ip_addr = getenv_IPaddr("ipaddr");

View File

@ -151,11 +151,6 @@ void board_init (void)
env_relocate(); env_relocate();
bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
s = getenv ("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s) s = (*e) ? e + 1 : e;
}
WATCHDOG_RESET (); WATCHDOG_RESET ();
devices_init(); devices_init();

View File

@ -157,11 +157,6 @@ void board_init (void)
env_relocate(); env_relocate();
bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
s = getenv ("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s) s = (*e) ? e + 1 : e;
}
WATCHDOG_RESET (); WATCHDOG_RESET ();
devices_init(); devices_init();

View File

@ -125,17 +125,7 @@ static int sh_mem_env_init(void)
static int sh_net_init(void) static int sh_net_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
char *s, *e;
int i;
gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr"); gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
s = getenv("ethaddr");
for (i = 0; i < 6; ++i) {
gd->bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
return 0; return 0;
} }
#endif #endif

View File

@ -390,25 +390,6 @@ void board_init_f(ulong bootflag)
board_late_init(); board_late_init();
#endif #endif
s = getenv("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#ifdef CONFIG_HAS_ETH1
/* handle the 2nd ethernet address */
s = getenv("eth1addr");
for (i = 0; i < 6; ++i) {
bd->bi_enet1addr[i] = s ? simple_strtoul(s, &e, 16) : 0;
if (s)
s = (*e) ? e + 1 : e;
}
#endif
#ifdef CONFIG_ID_EEPROM #ifdef CONFIG_ID_EEPROM
mac_read_from_eeprom(); mac_read_from_eeprom();
#endif #endif