Merge git://git.denx.de/u-boot-net
authorTom Rini <trini@konsulko.com>
Wed, 20 May 2015 19:57:55 +0000 (15:57 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 20 May 2015 19:57:55 +0000 (15:57 -0400)
126 files changed:
README
board/bct-brettl2/bct-brettl2.c
board/bf518f-ezbrd/bf518f-ezbrd.c
board/bf526-ezbrd/bf526-ezbrd.c
board/bf527-ezkit/bf527-ezkit.c
board/bf537-minotaur/bf537-minotaur.c
board/bf537-pnav/bf537-pnav.c
board/bf537-srv1/bf537-srv1.c
board/bf537-stamp/bf537-stamp.c
board/buffalo/lsxl/lsxl.c
board/cm-bf527/cm-bf527.c
board/cm-bf537e/cm-bf537e.c
board/cm-bf537u/cm-bf537u.c
board/dnp5370/dnp5370.c
board/ip04/ip04.c
board/tcm-bf518/tcm-bf518.c
board/tcm-bf537/tcm-bf537.c
configs/bct-brettl2_defconfig
configs/bf518f-ezbrd_defconfig
configs/bf526-ezbrd_defconfig
configs/bf527-ezkit_defconfig
configs/bf537-minotaur_defconfig
configs/bf537-pnav_defconfig
configs/bf537-srv1_defconfig
configs/bf537-stamp_defconfig
configs/cm-bf527_defconfig
configs/cm-bf537e_defconfig
configs/cm-bf537u_defconfig
configs/dnp5370_defconfig
configs/ip04_defconfig
configs/lschlv2_defconfig
configs/lsxhl_defconfig
configs/tcm-bf518_defconfig
configs/tcm-bf537_defconfig
doc/README.enetaddr
drivers/net/bcm-sf2-eth.c
drivers/net/designware.c
drivers/net/dm9000x.c
drivers/net/ftmac110.c
drivers/net/greth.c
drivers/net/lan91c96.c
drivers/net/macb.c
drivers/net/phy/phy.c
drivers/net/phy/realtek.c
examples/standalone/README.smc91111_eeprom
include/configs/M5208EVBE.h
include/configs/M5235EVB.h
include/configs/M5272C3.h
include/configs/M5282EVB.h
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/M54418TWR.h
include/configs/M54451EVB.h
include/configs/M54455EVB.h
include/configs/M5475EVB.h
include/configs/M5485EVB.h
include/configs/MPC8536DS.h
include/configs/MPC8540ADS.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/MPC8572DS.h
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h
include/configs/a4m072.h
include/configs/bct-brettl2.h
include/configs/bf518f-ezbrd.h
include/configs/bf526-ezbrd.h
include/configs/bf527-ezkit.h
include/configs/bf533-ezkit.h
include/configs/bf533-stamp.h
include/configs/bf537-minotaur.h
include/configs/bf537-pnav.h
include/configs/bf537-srv1.h
include/configs/bf537-stamp.h
include/configs/bf538f-ezkit.h
include/configs/bf548-ezkit.h
include/configs/bf561-acvilon.h
include/configs/bf561-ezkit.h
include/configs/blackstamp.h
include/configs/blackvme.h
include/configs/br4.h
include/configs/cm-bf527.h
include/configs/cm-bf533.h
include/configs/cm-bf537e.h
include/configs/cm-bf537u.h
include/configs/cm-bf548.h
include/configs/cm-bf561.h
include/configs/cobra5272.h
include/configs/dbau1x00.h
include/configs/ea20.h
include/configs/gr_cpci_ax2000.h
include/configs/gr_ep2s60.h
include/configs/gr_xc3s_1500.h
include/configs/grsim.h
include/configs/grsim_leon2.h
include/configs/ibf-dsp561.h
include/configs/inka4x0.h
include/configs/ip04.h
include/configs/lsxl.h
include/configs/microblaze-generic.h
include/configs/motionpro.h
include/configs/omap3_cairo.h
include/configs/pb1x00.h
include/configs/pr1.h
include/configs/sbc405.h
include/configs/sbc8548.h
include/configs/sbc8641d.h
include/configs/scb9328.h
include/configs/sequoia.h
include/configs/stxgp3.h
include/configs/stxssa.h
include/configs/tcm-bf518.h
include/configs/tcm-bf537.h
include/configs/uniphier.h
include/configs/v38b.h
include/configs/work_92105.h
include/configs/xaeniax.h
include/configs/zeus.h
include/env_default.h
net/Kconfig
net/eth.c

diff --git a/README b/README
index 2e81ccc37c782d65aee6e82283d76bff44515d13..a96dd428cbbe5644514469d2fa9dd76812ff4ec6 100644 (file)
--- a/README
+++ b/README
@@ -2110,18 +2110,6 @@ CBFS (Coreboot Filesystem) support
                Some PHY like Intel LXT971A need extra delay after
                command issued before MII status register can be read
 
-- Ethernet address:
-               CONFIG_ETHADDR
-               CONFIG_ETH1ADDR
-               CONFIG_ETH2ADDR
-               CONFIG_ETH3ADDR
-               CONFIG_ETH4ADDR
-               CONFIG_ETH5ADDR
-
-               Define a default value for Ethernet address to use
-               for the respective Ethernet interface, in case this
-               is not determined automatically.
-
 - IP address:
                CONFIG_IPADDR
 
@@ -2876,8 +2864,8 @@ CBFS (Coreboot Filesystem) support
                completely disabled. Anybody can change or delete
                these parameters.
 
-               Alternatively, if you #define _both_ CONFIG_ETHADDR
-               _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
+               Alternatively, if you define _both_ an ethaddr in the
+               default env _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
                Ethernet address is installed in the environment,
                which can be changed exactly ONCE by the user. [The
                serial# is unaffected by this, i. e. it remains
@@ -5626,7 +5614,8 @@ o If both the SROM and the environment contain a MAC address, and the
   warning is printed.
 
 o If neither SROM nor the environment contain a MAC address, an error
-  is raised.
+  is raised. If CONFIG_NET_RANDOM_ETHADDR is defined, then in this case
+  a random, locally-assigned MAC is used.
 
 If Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses
 will be programmed into hardware as part of the initialization process.         This
index 1f0dfb4d403e6dc97194ff4ad3f97fb49d89885a..bf7cd62954bd457fb56a1c24fa4ea9cbd7b159aa 100644 (file)
@@ -29,13 +29,6 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       puts("Warning: Generating 'random' MAC address\n");
-       net_random_ethaddr(mac_addr);
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
 int board_eth_init(bd_t *bis)
 {
        int retry = 3;
@@ -107,12 +100,6 @@ static void turn_leds_off(void)
 /* miscellaneous platform dependent initialisations */
 int misc_init_r(void)
 {
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
        gpio_cfi_flash_init();
        init_tlv320aic31();
        init_mute_pin();
index 8ecfbb28c9a98466ffdad9a7b23318a5f9b852ff..bf4a7db03d6d2bf231d23d5c7087dc07b0c485cf 100644 (file)
@@ -29,28 +29,14 @@ int checkboard(void)
 #if defined(CONFIG_BFIN_MAC)
 static void board_init_enetaddr(uchar *mac_addr)
 {
-#ifdef CONFIG_SYS_NO_FLASH
-# define USE_MAC_IN_FLASH 0
-#else
-# define USE_MAC_IN_FLASH 1
-#endif
-       bool valid_mac = false;
-
-       if (USE_MAC_IN_FLASH) {
-               /* we cram the MAC in the last flash sector */
-               uchar *board_mac_addr = (uchar *)0x203F0096;
-               if (is_valid_ethaddr(board_mac_addr)) {
-                       memcpy(mac_addr, board_mac_addr, 6);
-                       valid_mac = true;
-               }
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+#ifndef CONFIG_SYS_NO_FLASH
+       /* we cram the MAC in the last flash sector */
+       uchar *board_mac_addr = (uchar *)0x203F0096;
+       if (is_valid_ethaddr(board_mac_addr)) {
+               memcpy(mac_addr, board_mac_addr, 6);
+               eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
+#endif
 }
 
 /* Only the first run of boards had a KSZ switch */
index 0a88491e902f8ffcfc360e7ca77931efc7e8e864..db1ee283f250e8dfdaacf94df26d9fa200bbef4d 100644 (file)
@@ -26,28 +26,14 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-#ifdef CONFIG_SYS_NO_FLASH
-# define USE_MAC_IN_FLASH 0
-#else
-# define USE_MAC_IN_FLASH 1
-#endif
-       bool valid_mac = false;
-
-       if (USE_MAC_IN_FLASH) {
-               /* we cram the MAC in the last flash sector */
-               uchar *board_mac_addr = (uchar *)0x203F0096;
-               if (is_valid_ethaddr(board_mac_addr)) {
-                       memcpy(mac_addr, board_mac_addr, 6);
-                       valid_mac = true;
-               }
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+#ifndef CONFIG_SYS_NO_FLASH
+       /* we cram the MAC in the last flash sector */
+       uchar *board_mac_addr = (uchar *)0x203F0096;
+       if (is_valid_ethaddr(board_mac_addr)) {
+               memcpy(mac_addr, board_mac_addr, 6);
+               eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
+#endif
 }
 
 int board_eth_init(bd_t *bis)
index 257775f3c87e9ff01b58fbd9dc9b25781c5a6a0b..b551d4ed7e34ece6c2c31c741e561d819a8d7bcc 100644 (file)
@@ -27,8 +27,6 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-       bool valid_mac = false;
-
        /* the MAC is stored in OTP memory page 0xDF */
        uint32_t ret;
        uint64_t otp_mac;
@@ -41,15 +39,8 @@ static void board_init_enetaddr(uchar *mac_addr)
                        mac_addr[ret] = otp_mac_p[5 - ret];
 
                if (is_valid_ethaddr(mac_addr))
-                       valid_mac = true;
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+                       eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
 }
 
 int board_eth_init(bd_t *bis)
index 71b4293ad62240474036224fbb6df9bbc9acc385..9312216dc74667eb890016c47ebe2e60b7371a49 100644 (file)
@@ -23,26 +23,8 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       puts("Warning: Generating 'random' MAC address\n");
-       net_random_ethaddr(mac_addr);
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
 int board_eth_init(bd_t *bis)
 {
        return bfin_EMAC_initialize(bis);
 }
 #endif
-
-int misc_init_r(void)
-{
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
-       return 0;
-}
index 93522df56c35542b79a6dff1bc09821f03c95603..6739fe1ed61fe874f887d410c6534e7b2948dd2b 100644 (file)
@@ -23,26 +23,8 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       puts("Warning: Generating 'random' MAC address\n");
-       net_random_ethaddr(mac_addr);
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
 int board_eth_init(bd_t *bis)
 {
        return bfin_EMAC_initialize(bis);
 }
 #endif
-
-int misc_init_r(void)
-{
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
-       return 0;
-}
index 6581028294fc743775a0a872abf71eab6ced1a3b..b0ffe1aeea1a9cf285cdac9016cb88bbae7391c2 100644 (file)
@@ -23,26 +23,8 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       puts("Warning: Generating 'random' MAC address\n");
-       net_random_ethaddr(mac_addr);
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
 int board_eth_init(bd_t *bis)
 {
        return bfin_EMAC_initialize(bis);
 }
 #endif
-
-int misc_init_r(void)
-{
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
-       return 0;
-}
index 66e54925daefa66d53d519b1c79d5364f6231502..85d41d0aaae4de44bccd7ceeaaac4f879920a5d9 100644 (file)
@@ -29,28 +29,14 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-#ifdef CONFIG_SYS_NO_FLASH
-# define USE_MAC_IN_FLASH 0
-#else
-# define USE_MAC_IN_FLASH 1
-#endif
-       bool valid_mac = false;
-
-       if (USE_MAC_IN_FLASH) {
-               /* we cram the MAC in the last flash sector */
-               uchar *board_mac_addr = (uchar *)0x203F0000;
-               if (is_valid_ethaddr(board_mac_addr)) {
-                       memcpy(mac_addr, board_mac_addr, 6);
-                       valid_mac = true;
-               }
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+#ifndef CONFIG_SYS_NO_FLASH
+       /* we cram the MAC in the last flash sector */
+       uchar *board_mac_addr = (uchar *)0x203F0000;
+       if (is_valid_ethaddr(board_mac_addr)) {
+               memcpy(mac_addr, board_mac_addr, 6);
+               eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
+#endif
 }
 
 int board_eth_init(bd_t *bis)
index 487875c23a15e96f1d4e18d15ec05021e5cd68f3..45dd7888051b640cdac49a292d769919208f8b19 100644 (file)
@@ -230,16 +230,6 @@ static void rescue_mode(void)
        uchar enetaddr[6];
 
        printf("Entering rescue mode..\n");
-#ifdef CONFIG_RANDOM_MACADDR
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
-               net_random_ethaddr(enetaddr);
-               if (eth_setenv_enetaddr("ethaddr", enetaddr)) {
-                       printf("Failed to set ethernet address\n");
-                               set_led(LED_ALARM_BLINKING);
-                       return;
-               }
-       }
-#endif
        setenv("bootsource", "rescue");
 }
 
index 2871fa2d6a7307ac10c16b8aa61cad810b641d4a..3186c6717effa985158e3c578d62c1d4f4578b42 100644 (file)
@@ -26,8 +26,6 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-       bool valid_mac = false;
-
        /* the MAC is stored in OTP memory page 0xDF */
        uint32_t ret;
        uint64_t otp_mac;
@@ -40,15 +38,8 @@ static void board_init_enetaddr(uchar *mac_addr)
                        mac_addr[ret] = otp_mac_p[5 - ret];
 
                if (is_valid_ethaddr(mac_addr))
-                       valid_mac = true;
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+                       eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
 }
 
 int board_eth_init(bd_t *bis)
index 902611ec016aa25e7d89b4eea6aa542666d9aff2..57c72a2c06778909837a454ff4a6ea4554e93b19 100644 (file)
@@ -23,18 +23,6 @@ int checkboard(void)
        return 0;
 }
 
-static void board_init_enetaddr(char *var)
-{
-       uchar enetaddr[6];
-
-       if (eth_getenv_enetaddr(var, enetaddr))
-               return;
-
-       printf("Warning: %s: generating 'random' MAC address\n", var);
-       net_random_ethaddr(enetaddr);
-       eth_setenv_enetaddr(var, enetaddr);
-}
-
 #ifndef CONFIG_BFIN_MAC
 # define bfin_EMAC_initialize(x) 1
 #endif
@@ -50,9 +38,6 @@ int board_eth_init(bd_t *bis)
 
 int misc_init_r(void)
 {
-       board_init_enetaddr("ethaddr");
-       board_init_enetaddr("eth1addr");
-
        gpio_cfi_flash_init();
 
        return 0;
index 69bffd76de892765c7e7c1d8eff43af3ebfbc6fd..f365cdbeb776d7fbd607d15b82274b1f15ccac5f 100644 (file)
@@ -23,18 +23,6 @@ int checkboard(void)
        return 0;
 }
 
-static void board_init_enetaddr(char *var)
-{
-       uchar enetaddr[6];
-
-       if (eth_getenv_enetaddr(var, enetaddr))
-               return;
-
-       printf("Warning: %s: generating 'random' MAC address\n", var);
-       net_random_ethaddr(enetaddr);
-       eth_setenv_enetaddr(var, enetaddr);
-}
-
 #ifndef CONFIG_BFIN_MAC
 # define bfin_EMAC_initialize(x) 1
 #endif
@@ -50,9 +38,6 @@ int board_eth_init(bd_t *bis)
 
 int misc_init_r(void)
 {
-       board_init_enetaddr("ethaddr");
-       board_init_enetaddr("eth1addr");
-
        gpio_cfi_flash_init();
 
        return 0;
index 655fcace2b8f0e9e1a6db89590b60824de028c05..ae9ba84dc2490f63c8cc9559f775310df0dd250d 100644 (file)
@@ -36,28 +36,14 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-#ifdef CONFIG_SYS_NO_FLASH
-# define USE_MAC_IN_FLASH 0
-#else
-# define USE_MAC_IN_FLASH 1
-#endif
-       bool valid_mac = false;
-
-       if (USE_MAC_IN_FLASH) {
-               /* we cram the MAC in the last flash sector */
-               uchar *board_mac_addr = (uchar *)0x202F0000;
-               if (is_valid_ethaddr(board_mac_addr)) {
-                       memcpy(mac_addr, board_mac_addr, 6);
-                       valid_mac = true;
-               }
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
+#ifndef CONFIG_SYS_NO_FLASH
+       /* we cram the MAC in the last flash sector */
+       uchar *board_mac_addr = (uchar *)0x202F0000;
+       if (is_valid_ethaddr(board_mac_addr)) {
+               memcpy(mac_addr, board_mac_addr, 6);
+               eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
+#endif
 }
 
 int board_eth_init(bd_t *bis)
index d20500f4df53aed084f47b7a539e22a90d18669f..70765bce50de3ddfb08dac2362442aa01cef709f 100644 (file)
@@ -26,16 +26,4 @@ int board_eth_init(bd_t *bis)
 {
        return dm9000_initialize(bis);
 }
-
-int misc_init_r(void)
-{
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(enetaddr);
-               eth_setenv_enetaddr("ethaddr", enetaddr);
-       }
-
-       return 0;
-}
 #endif
index 3fa7d972eafa25b1d3094ec96217e6d782a85e39..4348678aebcd86daa05ef1d5df3cca778519c76a 100644 (file)
@@ -23,52 +23,12 @@ int checkboard(void)
 }
 
 #if defined(CONFIG_BFIN_MAC)
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       bool valid_mac = false;
-
-#if 0
-       /* the MAC is stored in OTP memory page 0xDF */
-       uint32_t ret;
-       uint64_t otp_mac;
-
-       ret = bfrom_OtpRead(0xDF, OTP_LOWER_HALF, &otp_mac);
-       if (!(ret & OTP_MASTER_ERROR)) {
-               uchar *otp_mac_p = (uchar *)&otp_mac;
-
-               for (ret = 0; ret < 6; ++ret)
-                       mac_addr[ret] = otp_mac_p[5 - ret];
-
-               if (is_valid_ethaddr(mac_addr))
-                       valid_mac = true;
-       }
-#endif
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               net_random_ethaddr(mac_addr);
-       }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
 int board_eth_init(bd_t *bis)
 {
        return bfin_EMAC_initialize(bis);
 }
 #endif
 
-int misc_init_r(void)
-{
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
-       return 0;
-}
-
 #ifdef CONFIG_BFIN_SDH
 int board_mmc_init(bd_t *bis)
 {
index 2531a4433640d70a6df73179f5a069fd4af90b58..2cf70cab1518b06d271555cf90303c7e57571596 100644 (file)
@@ -23,18 +23,6 @@ int checkboard(void)
        return 0;
 }
 
-static void board_init_enetaddr(char *var)
-{
-       uchar enetaddr[6];
-
-       if (eth_getenv_enetaddr(var, enetaddr))
-               return;
-
-       printf("Warning: %s: generating 'random' MAC address\n", var);
-       net_random_ethaddr(enetaddr);
-       eth_setenv_enetaddr(var, enetaddr);
-}
-
 #ifndef CONFIG_BFIN_MAC
 # define bfin_EMAC_initialize(x) 1
 #endif
@@ -50,9 +38,6 @@ int board_eth_init(bd_t *bis)
 
 int misc_init_r(void)
 {
-       board_init_enetaddr("ethaddr");
-       board_init_enetaddr("eth1addr");
-
        gpio_cfi_flash_init();
 
        return 0;
index 26b145d30a1247153c2432685ae8ae27d1014c4c..84eb1febde57c109a7c8fabe61be8c4fdd9717af 100644 (file)
@@ -1,3 +1,4 @@
 CONFIG_BLACKFIN=y
-CONFIG_TARGET_BCT_BRETTL2=y
+CONFIG_NET=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index fb35ad023dbba91dbd1ccbf8bb3c4ff5248313fe..51f93f845645025e2816311e5a53352e71f9e5f0 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF518F_EZBRD=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index da06d3ad6eea05f0a07955036ca858886290f65b..245faacfccc9f4b396e765edca6c5d3c1975b6f4 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF526_EZBRD=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index 69f6ef781b9cbabe6ffeaeba8193caa6285eb050..0451c6439134cecc81679d0ccbacdbc1851812eb 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF527_EZKIT=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index e76118fbd3b8d2d95c0e345654ea12acfcd942bc..1f398a00d1b3160108b2007e3b5f78b524be8ffe 100644 (file)
@@ -1,2 +1,4 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF537_MINOTAUR=y
+CONFIG_NET_RANDOM_ETHADDR=y
index ba5eaaa392b19c2ff1d2256d94406e5123bd5d05..63722589b8813c01a3eced455201f8bcf5fcebfb 100644 (file)
@@ -1,2 +1,4 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF537_PNAV=y
+CONFIG_NET_RANDOM_ETHADDR=y
index 61ac0e7d0e1a1eb6e3fa67e89f57f931f1560990..f007c8269eb426c603d1fbcac4b887ecc2eedda9 100644 (file)
@@ -1,2 +1,4 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF537_SRV1=y
+CONFIG_NET_RANDOM_ETHADDR=y
index 9b9a92f13fa79591f6f14e8a489ae8969900d8cf..50483b18ffa031a79435ec77bf43848f2c8c0ab5 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_BF537_STAMP=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index a6830b54fd396b019dd884bdb200d147d379caea..5bceb17bc9993199e354bb7e5dd33d20099b8eab 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_CM_BF527=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index a44eab7f0da6b1e82b53b2e7f7e2d08a0b61a841..fd9dd00d3e592afe2d8861df218f9e7a6dc34743 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_CM_BF537E=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index 29c33b95144aa403569afd40a50075478e13559a..4a8f123bb0f8eafa388d0f2b1ace772bfbad2307 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_CM_BF537U=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index 0c000876314dac4b4eefd20d70984e67e4c5843f..c7104caef84cb8e8708af53d85d8e3f7e8e8406b 100644 (file)
@@ -1,2 +1,4 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_DNP5370=y
+CONFIG_NET_RANDOM_ETHADDR=y
index ba737aedfbe46cd0e2d4db912de04858699cc1ff..69110a3cb7f74ce702dd2a107780924f22c2696e 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_IP04=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index efd8fcaa4855b0cecf6f1badd070750f96aceac6..31452a3463e73b6b938035f1c4bf68b189c196f6 100644 (file)
@@ -1,4 +1,6 @@
 CONFIG_ARM=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_LSXL=y
+CONFIG_NET=y
 CONFIG_SYS_EXTRA_OPTIONS="LSCHLV2"
+CONFIG_NET_RANDOM_ETHADDR=y
index bb3a80e8739731b3dbf0dc97032e6076976cff37..00f48bcc47bffa352a430afb833e7f98f9714296 100644 (file)
@@ -1,4 +1,6 @@
 CONFIG_ARM=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_LSXL=y
+CONFIG_NET=y
 CONFIG_SYS_EXTRA_OPTIONS="LSXHL"
+CONFIG_NET_RANDOM_ETHADDR=y
index 0c9ae4d57e7917a55869dc997ff421804e8fcbf2..f16d863435cd00783a38abc7e13c0bda650a7bd8 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_TCM_BF518=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index 6d604b6c9e4af2cec8f25ae9b61a2f2560afd089..7f3a3a67a626bdd82538b1913a12fcc1084cf301 100644 (file)
@@ -1,3 +1,5 @@
 CONFIG_BLACKFIN=y
+CONFIG_NET=y
 CONFIG_TARGET_TCM_BF537=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
index 0fafd2cdcd5f575796c69fc3fe97c085d4a666b4..50e4899787792246face19fcb4561afe0eafca1e 100644 (file)
@@ -15,7 +15,7 @@ Here are the places where MAC addresses might be stored:
  - board-specific location (eeprom, dedicated flash, ...)
        Note: only used when mandatory due to hardware design etc...
 
- - environment ("ethaddr", "eth1addr", ...) (see CONFIG_ETHADDR)
+ - environment ("ethaddr", "eth1addr", ...)
        Note: this is the preferred way to permanently store MAC addresses
 
  - ethernet data (struct eth_device -> enetaddr)
@@ -37,6 +37,8 @@ Correct flow of setting up the MAC address (summarized):
    environment variable will be used unchanged.
    If the environment variable is not set, it will be initialized from
    eth_device->enetaddr, and a warning will be printed.
+   If both are invalid and CONFIG_NET_RANDOM_ETHADDR is defined, a random,
+   locally-assigned MAC is written to eth_device->enetaddr.
 4. Program the address into hardware if the following conditions are met:
        a) The relevant driver has a 'write_addr' function
        b) The user hasn't set an 'ethmacskip' environment variable
index 51d5146363084a6e3a052acd9fd7e2382c6d4d17..eab4c1f9003258d3926318d69b60f8c061e53c76 100644 (file)
@@ -154,12 +154,6 @@ static int bcm_sf2_eth_open(struct eth_device *dev, bd_t *bt)
 
        debug("Enabling BCM SF2 Ethernet.\n");
 
-       /* Set MAC address from env */
-       if (bcm_sf2_eth_write_hwaddr(dev) != 0) {
-               error("%s: MAC set error when opening !\n", __func__);
-               return -1;
-       }
-
        eth->enable_mac();
 
        /* enable tx and rx DMA */
index 07281a6ce9d2fa204e30c1cfee3e1b5258739485..ae51cf378162b0500edc2152a4b3db4a86604c8e 100644 (file)
@@ -243,10 +243,6 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
                mdelay(100);
        };
 
-       /* Soft reset above clears HW address registers.
-        * So we have to set it here once again */
-       _dw_write_hwaddr(priv, enetaddr);
-
        rx_descs_init(priv);
        tx_descs_init(priv);
 
index ccd2131f88f156eb61b03bc241e4b505b50d66c8..3c41cec3e4d30f8b28d71a7f077a61232e302972 100644 (file)
@@ -343,13 +343,7 @@ static int dm9000_init(struct eth_device *dev, bd_t *bd)
 
        printf("MAC: %pM\n", dev->enetaddr);
        if (!is_valid_ethaddr(dev->enetaddr)) {
-#ifdef CONFIG_RANDOM_MACADDR
-               printf("Bad MAC address (uninitialized EEPROM?), randomizing\n");
-               net_random_ethaddr(dev->enetaddr);
-               printf("MAC: %pM\n", dev->enetaddr);
-#else
                printf("WARNING: Bad MAC address (uninitialized EEPROM?)\n");
-#endif
        }
 
        /* fill device MAC address registers */
index 4bae9ad977c388de2aeb6cd1b25a1d8fd8518ab5..4f17015bc593edece051b70e6a508e7812740f32 100644 (file)
@@ -424,9 +424,6 @@ int ftmac110_initialize(bd_t *bis)
        dev->send = ftmac110_send;
        dev->recv = ftmac110_recv;
 
-       if (!eth_getenv_enetaddr_by_index("eth", card_nr, dev->enetaddr))
-               net_random_ethaddr(dev->enetaddr);
-
        /* allocate tx descriptors (it must be 16 bytes aligned) */
        chip->txd = dma_alloc_coherent(
                sizeof(struct ftmac110_desc) * CFG_TXDES_NUM, &chip->txd_dma);
index a93b37a5d7dafa03ef95ae2df49576d704250561..9bc8a8d1aa1543a74923f90f605684e6281cc18a 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <errno.h>
 #include <net.h>
 #include <netdev.h>
 #include <malloc.h>
@@ -653,13 +654,8 @@ int greth_initialize(bd_t * bis)
                        }
                }
        } else {
-               /* HW Address not found in environment, Set default HW address */
-               addr[0] = GRETH_HWADDR_0;       /* MSB */
-               addr[1] = GRETH_HWADDR_1;
-               addr[2] = GRETH_HWADDR_2;
-               addr[3] = GRETH_HWADDR_3;
-               addr[4] = GRETH_HWADDR_4;
-               addr[5] = GRETH_HWADDR_5;       /* LSB */
+               /* No ethaddr set */
+               return -EINVAL;
        }
 
        /* set and remember MAC address */
index 495c0886faea75df712643f27e89a9f5c35dc2ec..c4dd01ec2aacf541531ab903d3978b4f90b62847 100644 (file)
@@ -725,12 +725,6 @@ static int smc_get_ethaddr(bd_t *bd, struct eth_device *dev)
 
 static int get_rom_mac(struct eth_device *dev, unsigned char *v_rom_mac)
 {
-#ifdef HARDCODE_MAC    /* used for testing or to supress run time warnings */
-       char hw_mac_addr[] = { 0x02, 0x80, 0xad, 0x20, 0x31, 0xb8 };
-
-       memcpy (v_rom_mac, hw_mac_addr, 6);
-       return (1);
-#else
        int i;
        SMC_SELECT_BANK(dev, 1);
        for (i=0; i<6; i++)
@@ -738,7 +732,6 @@ static int get_rom_mac(struct eth_device *dev, unsigned char *v_rom_mac)
                v_rom_mac[i] = SMC_inb(dev, LAN91C96_IA0 + i);
        }
        return (1);
-#endif
 }
 
 /* Structure to detect the device IDs */
index 4e1a7fe58398843a6192da01522d8d9a24c278b2..f9491617382ca2659078d047d6d4f31a794f4f64 100644 (file)
@@ -525,7 +525,6 @@ static int macb_phy_init(struct macb_device *macb)
        return 1;
 }
 
-static int macb_write_hwaddr(struct eth_device *dev);
 static int macb_init(struct eth_device *netdev, bd_t *bd)
 {
        struct macb_device *macb = to_macb(netdev);
@@ -594,14 +593,6 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
 #endif /* CONFIG_RMII */
        }
 
-       /* update the ethaddr */
-       if (is_valid_ethaddr(netdev->enetaddr)) {
-               macb_write_hwaddr(netdev);
-       } else {
-               printf("%s: mac address is not valid\n", netdev->name);
-               return -1;
-       }
-
        if (!macb_phy_init(macb))
                return -1;
 
index f5221a3833febc88bbc099ec0bba57928f6513be..c8d08e8f4f1cbc793d73f6f09db5a55414cbcf32 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/err.h>
 #include <linux/compiler.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* Generic PHY support and helper functions */
 
 /**
@@ -494,6 +496,20 @@ int phy_register(struct phy_driver *drv)
        INIT_LIST_HEAD(&drv->list);
        list_add_tail(&drv->list, &phy_drivers);
 
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
+       if (drv->probe)
+               drv->probe += gd->reloc_off;
+       if (drv->config)
+               drv->config += gd->reloc_off;
+       if (drv->startup)
+               drv->startup += gd->reloc_off;
+       if (drv->shutdown)
+               drv->shutdown += gd->reloc_off;
+       if (drv->readext)
+               drv->readext += gd->reloc_off;
+       if (drv->writeext)
+               drv->writeext += gd->reloc_off;
+#endif
        return 0;
 }
 
index ee9707950a87f6028a1e162779227ab9422b58c1..79452a8df325d17f89f378b99946214b5ec3e46a 100644 (file)
 /* RTL8211x PHY Interrupt Status Register */
 #define MIIM_RTL8211x_PHY_INSR         0x13
 
+/* RTL8211F PHY Status Register */
+#define MIIM_RTL8211F_PHY_STATUS       0x1a
+#define MIIM_RTL8211F_AUTONEG_ENABLE   0x1000
+#define MIIM_RTL8211F_PHYSTAT_SPEED    0x0030
+#define MIIM_RTL8211F_PHYSTAT_GBIT     0x0020
+#define MIIM_RTL8211F_PHYSTAT_100      0x0010
+#define MIIM_RTL8211F_PHYSTAT_DUPLEX   0x0008
+#define MIIM_RTL8211F_PHYSTAT_SPDDONE  0x0800
+#define MIIM_RTL8211F_PHYSTAT_LINK     0x0004
+
+#define MIIM_RTL8211F_PAGE_SELECT      0x1f
+#define MIIM_RTL8211F_TX_DELAY         0x100
+
 /* RealTek RTL8211x */
 static int rtl8211x_config(struct phy_device *phydev)
 {
@@ -48,6 +61,29 @@ static int rtl8211x_config(struct phy_device *phydev)
        return 0;
 }
 
+static int rtl8211f_config(struct phy_device *phydev)
+{
+       u16 reg;
+
+       phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
+
+       if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
+               /* enable TXDLY */
+               phy_write(phydev, MDIO_DEVAD_NONE,
+                         MIIM_RTL8211F_PAGE_SELECT, 0xd08);
+               reg = phy_read(phydev, MDIO_DEVAD_NONE, 0x11);
+               reg |= MIIM_RTL8211F_TX_DELAY;
+               phy_write(phydev, MDIO_DEVAD_NONE, 0x11, reg);
+               /* restore to default page 0 */
+               phy_write(phydev, MDIO_DEVAD_NONE,
+                         MIIM_RTL8211F_PAGE_SELECT, 0x0);
+       }
+
+       genphy_config_aneg(phydev);
+
+       return 0;
+}
+
 static int rtl8211x_parse_status(struct phy_device *phydev)
 {
        unsigned int speed;
@@ -105,6 +141,51 @@ static int rtl8211x_parse_status(struct phy_device *phydev)
        return 0;
 }
 
+static int rtl8211f_parse_status(struct phy_device *phydev)
+{
+       unsigned int speed;
+       unsigned int mii_reg;
+       int i = 0;
+
+       phy_write(phydev, MDIO_DEVAD_NONE, MIIM_RTL8211F_PAGE_SELECT, 0xa43);
+       mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_RTL8211F_PHY_STATUS);
+
+       phydev->link = 1;
+       while (!(mii_reg & MIIM_RTL8211F_PHYSTAT_LINK)) {
+               if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
+                       puts(" TIMEOUT !\n");
+                       phydev->link = 0;
+                       break;
+               }
+
+               if ((i++ % 1000) == 0)
+                       putc('.');
+               udelay(1000);
+               mii_reg = phy_read(phydev, MDIO_DEVAD_NONE,
+                                  MIIM_RTL8211F_PHY_STATUS);
+       }
+
+       if (mii_reg & MIIM_RTL8211F_PHYSTAT_DUPLEX)
+               phydev->duplex = DUPLEX_FULL;
+       else
+               phydev->duplex = DUPLEX_HALF;
+
+       speed = (mii_reg & MIIM_RTL8211F_PHYSTAT_SPEED);
+
+       switch (speed) {
+       case MIIM_RTL8211F_PHYSTAT_GBIT:
+               phydev->speed = SPEED_1000;
+               break;
+       case MIIM_RTL8211F_PHYSTAT_100:
+               phydev->speed = SPEED_100;
+               break;
+       default:
+               phydev->speed = SPEED_10;
+       }
+
+       return 0;
+}
+
 static int rtl8211x_startup(struct phy_device *phydev)
 {
        /* Read the Status (2x to make sure link is right) */
@@ -114,6 +195,15 @@ static int rtl8211x_startup(struct phy_device *phydev)
        return 0;
 }
 
+static int rtl8211f_startup(struct phy_device *phydev)
+{
+       /* Read the Status (2x to make sure link is right) */
+       genphy_update_link(phydev);
+       rtl8211f_parse_status(phydev);
+
+       return 0;
+}
+
 /* Support for RTL8211B PHY */
 static struct phy_driver RTL8211B_driver = {
        .name = "RealTek RTL8211B",
@@ -147,10 +237,22 @@ static struct phy_driver RTL8211DN_driver = {
        .shutdown = &genphy_shutdown,
 };
 
+/* Support for RTL8211F PHY */
+static struct phy_driver RTL8211F_driver = {
+       .name = "RealTek RTL8211F",
+       .uid = 0x1cc916,
+       .mask = 0xffffff,
+       .features = PHY_GBIT_FEATURES,
+       .config = &rtl8211f_config,
+       .startup = &rtl8211f_startup,
+       .shutdown = &genphy_shutdown,
+};
+
 int phy_realtek_init(void)
 {
        phy_register(&RTL8211B_driver);
        phy_register(&RTL8211E_driver);
+       phy_register(&RTL8211F_driver);
        phy_register(&RTL8211DN_driver);
 
        return 0;
index a2d52e77703f94ebeb963d8e62213d556a78d5b7..f73a8d3a581bb6d167a2473787996f4ae3e67f48 100644 (file)
@@ -27,29 +27,6 @@ To find out who has a MAC address, or to purchase MAC addresses, goto
 the IEEE, at:
 http://standards.ieee.org/regauth/oui/index.shtml
 
-To change your MAC address, there can not be a MAC address predefined in
-U-Boot. To ensure that this does not occur, check your
-include/configs/<board_name>.h file, and check to see that the following
-settings are _not_ or commented out there.
-
-#define HARDCODE_MAC                   1
-#define CONFIG_ETHADDR                 02:80:ad:20:31:b8
-
-The purpose of HARDCODE_MAC is to hardcode the MAC address in software,
-(not what we want), or to preset it to 02:80:ad:20:31:b8 (not what we
-want either).
-
-You can check this in a running U-Boot, by doing a power cycle, then
-before U-Boot tries to do any networking, running the 'printenv' command
-
-  BOOT> printenv
-
-  ethaddr=02:80:ad:20:31:b8
-
-If you see the 'ethaddr' variable show up, like the above, you need to
-recompile U-Boot, with the above settings commented out of the
-include/configs/<board_name>.h file.
-
 2. Running the smc91111_eeprom program
 ---------------------------------------------------------------------
 
index 7eac03baaf2dcbd75f2a04bc759b0880e9c41ca0..d0f4d758b77bbd26829375a4095e760840423e6c 100644 (file)
 #define CONFIG_UDP_CHECKSUM
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* CONFIG_MCFFEC */
 
 #define CONFIG_HOSTNAME                M5208EVBe
index 4bba81544fd67181ff6bfcb4a358b1f1defd77e9..a76632494c6a764b4dae18a70afefcef6e06da9f 100644 (file)
 #define CONFIG_BOOTDELAY       1       /* autoboot after 5 seconds */
 #define CONFIG_BOOTFILE                "u-boot.bin"
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* FEC_ENET */
 
 #define CONFIG_HOSTNAME                M5235EVB
index 159d2f8ced3e2173517476db8eebeb2a758c77cf..9946108c1299d9ac96b8905ba67c39dbd6279784 100644 (file)
 #endif
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* CONFIG_MCFFEC */
 
 #define CONFIG_HOSTNAME                M5272C3
index bc740ae9058b486a27346f9890b4defd11acfe9d..4d3390b1f0f6c3d5b35cf5092fd5568f8fa3c460 100644 (file)
 
 #define CONFIG_BOOTDELAY       5
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* CONFIG_MCFFEC */
 
 #define CONFIG_HOSTNAME                M5282EVB
index 082970841245b820ebf01e1ad1fab4853a2f01ed..e2dd8e555512cb01b045944eea49663922391c7e 100644 (file)
 #define CONFIG_UDP_CHECKSUM
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
-#      define CONFIG_ETH1ADDR  00:e0:0c:bc:e5:61
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* FEC_ENET */
 
 #define CONFIG_HOSTNAME                M53017
index a42b5f6b475c0e706d6d2e4a8b60f3d83b511b22..5a7597c2398e488aa04c707ee4bfaddb0ab5f930 100644 (file)
 #define CONFIG_UDP_CHECKSUM
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* FEC_ENET */
 
 #define CONFIG_HOSTNAME                M5329EVB
index c142dfbe238067544936befc6a66130adf73f4ff..7550c571b80a0c7269274fe9da6fec12aa308c5c 100644 (file)
 #define CONFIG_UDP_CHECKSUM
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* FEC_ENET */
 
 #define CONFIG_HOSTNAME                M5373EVB
index 3a6e9811d51e02a61db20d0164770e3a01b872d7..25b3cdac4228b18a41cc7aef7032f2414cbdaeae 100644 (file)
                                "::eth0:off:rw console=ttyS0,115200"
 #endif
 
-#define CONFIG_ETHADDR         00:e0:0c:bc:e5:60
-#define CONFIG_ETH1ADDR        00:e0:0c:bc:e5:61
 #define CONFIG_ETHPRIME        "FEC0"
 #define CONFIG_IPADDR          192.168.1.2
 #define CONFIG_NETMASK         255.255.255.0
 #define CONFIG_SERVERIP        192.168.1.1
 #define CONFIG_GATEWAYIP       192.168.1.1
 
-#define CONFIG_OVERWRITE_ETHADDR_ONCE
 #define CONFIG_SYS_FEC_BUF_USE_SRAM
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #ifndef CONFIG_SYS_DISCOVER_PHY
index 1b3598a092cfa3d95b75e92f241ea8f5f1e9622d..f3cade380e4e27ed134148bafc708af1cf83e3ce 100644 (file)
 
 #      define CONFIG_BOOTDELAY 1       /* autoboot after 5 seconds */
 #      define CONFIG_BOOTARGS          "root=/dev/mtdblock1 rw rootfstype=jffs2 ip=none mtdparts=physmap-flash.0:2M(kernel)ro,-(jffs2)"
-#      define CONFIG_ETHADDR           00:e0:0c:bc:e5:60
 #      define CONFIG_ETHPRIME          "FEC0"
 #      define CONFIG_IPADDR            192.162.1.2
 #      define CONFIG_NETMASK           255.255.255.0
 #      define CONFIG_SERVERIP          192.162.1.1
 #      define CONFIG_GATEWAYIP         192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #      ifndef CONFIG_SYS_DISCOVER_PHY
index 2288bff56d42e7d08e051102f799a480ed416b71..b70800125115f01182f70b49f5c9465bc65fb2a3 100644 (file)
 
 #      define CONFIG_BOOTDELAY 1       /* autoboot after 5 seconds */
 #      define CONFIG_BOOTARGS          "root=/dev/mtdblock1 rw rootfstype=jffs2 ip=none mtdparts=physmap-flash.0:5M(kernel)ro,-(jffs2)"
-#      define CONFIG_ETHADDR           00:e0:0c:bc:e5:60
-#      define CONFIG_ETH1ADDR          00:e0:0c:bc:e5:61
 #      define CONFIG_ETHPRIME          "FEC0"
 #      define CONFIG_IPADDR            192.162.1.2
 #      define CONFIG_NETMASK           255.255.255.0
 #      define CONFIG_SERVERIP          192.162.1.1
 #      define CONFIG_GATEWAYIP         192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 
 /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
 #      ifndef CONFIG_SYS_DISCOVER_PHY
index 91d6a1ada92e35c2cfc6c146b02f9e29a158f7cf..658c170c92ebbdc412f0c8d66c55323119f34e81 100644 (file)
 #              endif
 #      endif                   /* CONFIG_SYS_DISCOVER_PHY */
 
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
-#      define CONFIG_ETH1ADDR  00:e0:0c:bc:e5:61
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 
 #endif
 
 #define CONFIG_UDP_CHECKSUM
 
 #ifdef CONFIG_MCFFEC
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 #endif                         /* FEC_ENET */
 
 #define CONFIG_HOSTNAME                M547xEVB
index ce9f3b01b2e530ea82e7bdbee163df74a6d8421e..efb64a14ce56726c3552d67941eed640340f223d 100644 (file)
 #              endif
 #      endif                   /* CONFIG_SYS_DISCOVER_PHY */
 
-#      define CONFIG_ETHADDR   00:e0:0c:bc:e5:60
-#      define CONFIG_ETH1ADDR  00:e0:0c:bc:e5:61
 #      define CONFIG_IPADDR    192.162.1.2
 #      define CONFIG_NETMASK   255.255.255.0
 #      define CONFIG_SERVERIP  192.162.1.1
 #      define CONFIG_GATEWAYIP 192.162.1.1
-#      define CONFIG_OVERWRITE_ETHADDR_ONCE
 
 #endif
 
index dc09b1f8704725e3c095268578e72b84ed544b48..d41eeb59b6f7beee4f78cc0e1c9479cdac9bdeee 100644 (file)
 /* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR 00:E0:0C:02:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR        00:E0:0C:02:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR        00:E0:0C:02:02:FD
 #define CONFIG_HAS_ETH3
-#define CONFIG_ETH3ADDR        00:E0:0C:02:03:FD
 #endif
 
 #define CONFIG_IPADDR          192.168.1.254
index 37c2b9415af9fb040d1c1f7410d97b688c7c40a7..b388168a1117a4128fc0643c17bb61a01839deb9 100644 (file)
@@ -12,7 +12,7 @@
  * Please refer to doc/README.mpc85xx for more info.
  *
  * Make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR, CONFIG_SERVERIP, etc in this file.
+ * search for CONFIG_SERVERIP, etc in this file.
  */
 
 #ifndef __CONFIG_H
 /* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
 #endif
 
 #define CONFIG_IPADDR    192.168.1.253
index 5d229a0d204611a2d23f94ea13c48cfcef356dac..609c5bb3be1534dfe7ad71918d716f2643f3bd40 100644 (file)
@@ -418,11 +418,8 @@ extern unsigned long get_clock_freq(void);
 /* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
 #endif
 
 #define CONFIG_IPADDR    192.168.1.253
index dade6d3b89cd18556c77adebec6597a73f3def3b..479589e3854ba4d9d32f2d2f68c93db5fd4c69ea 100644 (file)
@@ -449,9 +449,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 /* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR 00:E0:0C:02:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR        00:E0:0C:02:01:FD
 #endif
 
 #define CONFIG_IPADDR  192.168.1.251
index 190c668303a662533df6d625bd8cf914c1e01e6c..fb28512340979af660e53dd9bab19014dd692b94 100644 (file)
@@ -539,17 +539,11 @@ extern unsigned long get_clock_freq(void);
 /*
  * Environment Configuration
  */
-
-/* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR  00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR         00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR         00:E0:0C:00:02:FD
 #define CONFIG_HAS_ETH3
-#define CONFIG_ETH3ADDR         00:E0:0C:00:03:FD
 #endif
 
 #define CONFIG_IPADDR   192.168.1.253
index 5263ffcc8d6f32cfa1652731e407e541fbf40d5b..48b55b59e3a0e810d4e28ffe2d1158df9a3f5dbb 100644 (file)
@@ -412,15 +412,10 @@ extern unsigned long get_clock_freq(void);
 /*
  * Environment Configuration
  */
-
-/* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
 #endif
 
 #define CONFIG_IPADDR    192.168.1.253
index ac78d481d68ce2980b652fc2b8ee3e00837e40e4..92f0b7fe303a4e362d111c2e43fb8116a87ed21f 100644 (file)
@@ -12,7 +12,7 @@
  * Please refer to doc/README.mpc85xx for more info.
  *
  * Make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR, CONFIG_SERVERIP, etc in this file.
+ * search for CONFIG_SERVERIP, etc. in this file.
  */
 
 #ifndef __CONFIG_H
 /*
  * Environment Configuration
  */
-
-/* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
 #define CONFIG_HAS_ETH3
-#define CONFIG_ETH3ADDR  00:E0:0C:00:03:FD
 #endif
 
 #define CONFIG_IPADDR    192.168.1.253
index 02a5acf38ea3fd533a286bef83365727d35d04e6..57fc37b9bcd354eccb979fa57d3591803cdab960 100644 (file)
@@ -438,13 +438,9 @@ extern unsigned long get_clock_freq(void);
 /* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR   00:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
 #define CONFIG_HAS_ETH3
-#define CONFIG_ETH3ADDR  00:E0:0C:00:03:FD
 #endif
 
 #define CONFIG_IPADDR    192.168.1.253
index 5e7bc49dcf4a7bf2da8424d95ec75fe3d6935ac4..7b3ddbadf293063f0d1c86994f0d5b8b8f779cf8 100644 (file)
 /*
  * Environment Configuration
  */
-
-/* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR 00:E0:0C:02:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR        00:E0:0C:02:01:FD
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR        00:E0:0C:02:02:FD
 #define CONFIG_HAS_ETH3
-#define CONFIG_ETH3ADDR        00:E0:0C:02:03:FD
 #endif
 
 #define CONFIG_IPADDR          192.168.1.254
index e6d570a6af09429d7ec58dfeb3fa710e4e3ed0e3..cae133bf588dfa254c55a827b03b937a696c6a92 100644 (file)
 
 #define CONFIG_ULI526X
 #ifdef CONFIG_ULI526X
-#define CONFIG_ETHADDR   00:E0:0C:00:00:01
 #endif
 
 /************************************************************
index 9f755e50fcdaeeef4858f5ea3ab0d6fbda13d9a1..938874fe4240f7439dc00a6df025fb9be9a07c17 100644 (file)
@@ -10,7 +10,7 @@
  * MPC8641HPCN board configuration file
  *
  * Make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR, CONFIG_SERVERIP, etc in this file.
+ * search for CONFIG_SERVERIP, etc. in this file.
  */
 
 #ifndef __CONFIG_H
@@ -679,14 +679,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  * Environment Configuration
  */
 
-/* The mac addresses for all ethernet interface */
-#if defined(CONFIG_TSEC_ENET)
-#define CONFIG_ETHADDR  00:E0:0C:00:00:01
-#define CONFIG_ETH1ADDR  00:E0:0C:00:01:FD
-#define CONFIG_ETH2ADDR  00:E0:0C:00:02:FD
-#define CONFIG_ETH3ADDR  00:E0:0C:00:03:FD
-#endif
-
 #define CONFIG_HAS_ETH0                1
 #define CONFIG_HAS_ETH1                1
 #define CONFIG_HAS_ETH2                1
index 3c6765560e8cbdea6222b11f503078d77d9ca086..00589b7e682b222309156da0488dd707e1046ead 100644 (file)
                        "setenv bootargs ${bootargs} no_ethaddr;"       \
                "fi\0"                                                  \
        "hostname=CPUP0\0"                                              \
-       "ethaddr=00:00:00:00:00:00\0"                                   \
        "netdev=eth0\0"                                                 \
        "bootcmd=run bootcmd_nor\0"                                     \
        ""
index 2e0e9224cfa04407a00b0275bea5fef431694076..0d9fe57ba95652195219a220c2138873aeab94b1 100644 (file)
@@ -73,8 +73,6 @@
 #define CONFIG_GATEWAYIP       192.168.233.1
 #define CONFIG_SERVERIP                192.168.233.53
 #define CONFIG_ROOTPATH                "/romfs/brettl2"
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 #endif
 
index 50e85ca93c1126eca7094bdec57bceb3e3c9d0f8..dcd19e4db8a94fe940d4af5f7e33b4e8ba0471a6 100644 (file)
@@ -87,8 +87,6 @@
 #endif
 #define CONFIG_HOSTNAME                bf518f-ezbrd
 #define CONFIG_PHY_ADDR                3
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 7fc882a133b4e3c4b622dd8031e0dc9b3c0c5bc1..ad5fa53160043b74a68e8f3d194405fbe03eb132 100644 (file)
@@ -85,8 +85,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                bf526-ezbrd
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 79e440a0be4780bb05181f735c328508ae7b8dba..b23a250e0aee9d43c58e02e738d20e28c66c506b 100644 (file)
@@ -83,8 +83,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                bf527-ezkit
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 0fda967ac24ac2b183cbdec0e87ae3ed48dbf8d4..1b7290e8d74c483904304baf73c7c21e29d30583 100644 (file)
@@ -75,8 +75,6 @@
                SSYNC(); \
        } while (0)
 #define CONFIG_HOSTNAME                bf533-ezkit
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index ae4d83a8f1430265f4d2ed6e0c5b8ad5214d02f4..322705decbea0e711de0def34bfe5b2696c4806c 100644 (file)
@@ -68,8 +68,6 @@
                SSYNC(); \
        } while (0)
 #define CONFIG_HOSTNAME                bf533-stamp
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:b8 */
 
 
 /* I2C */
index 6df89af402985004962cbdac8b147c9f4c05900e..e705d08b3a4d4a83b996fdf894dde7811b676ddb 100644 (file)
@@ -86,8 +86,6 @@
 
 #define CONFIG_SYS_AUTOLOAD    "no"
 #define CONFIG_ROOTPATH                "/romfs"
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:42 */
 
 #define CONFIG_LIB_RAND
 
 #define CONFIG_SYS_LONGHELP            1
 #define CONFIG_CMDLINE_EDITING 1
 #define CONFIG_ENV_OVERWRITE   1
-#define CONFIG_MISC_INIT_R
 
 #define CONFIG_BAUDRATE                57600
 #define CONFIG_UART_CONSOLE    0
index 4f2b2cbf296a8fe25e124caa99f2de4fec07b63c..be11a85bc0067945177fb6af8be09cef59349748 100644 (file)
@@ -65,8 +65,6 @@
 #define CONFIG_RMII
 #endif
 #define CONFIG_HOSTNAME                bf537-pnav
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:24:21:18 */
 #define CONFIG_LIB_RAND
 
 /*
  * Misc Settings
  */
 #define CONFIG_BAUDRATE                115200
-#define CONFIG_MISC_INIT_R
 #define CONFIG_RTC_BFIN
 #define CONFIG_UART_CONSOLE    0
 
index d01d88f3b47cc673af67f5dd079fe8cad2ff76e1..9a7edf36b6be34cdf778d1404bfc0bc7c899d4d1 100644 (file)
@@ -86,8 +86,6 @@
 
 #define CONFIG_SYS_AUTOLOAD    "no"
 #define CONFIG_ROOTPATH                "/romfs"
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:42 */
 #define CONFIG_LIB_RAND
 
 /*
 #define CONFIG_SYS_LONGHELP            1
 #define CONFIG_CMDLINE_EDITING 1
 #define CONFIG_ENV_OVERWRITE   1
-#define CONFIG_MISC_INIT_R
 
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_UART_CONSOLE    0
index 7b5a5a7f71dfb3c4a71e817f49c024cf7e1ab69d..41f1b1f071c7847ca4b8c8eee4ec16da68576acd 100644 (file)
@@ -65,8 +65,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                bf537-stamp
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index e60558e1b62f838b524c663d4253606559ad486c..3c82bf270165187ec26a34732810aac0d4806838 100644 (file)
@@ -63,8 +63,6 @@
 #define CONFIG_SMC91111        1
 #define CONFIG_SMC91111_BASE   0x20310300
 #define CONFIG_HOSTNAME                bf538f-ezkit
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index e71e6d324cda769a743a4d3b01bef34c956031be..53f655890f56fe557ee3f517c37f12bcb45d74b3 100644 (file)
@@ -73,8 +73,6 @@
 #define CONFIG_SMC911X_BASE    0x24000000
 #define CONFIG_SMC911X_16_BIT
 #define CONFIG_HOSTNAME                bf548-ezkit
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index 6871d8c422265308d6955c51ac5779de9525efd0..03f3cec9dbb03ea6c051da7c2d9828563164eadf 100644 (file)
@@ -92,9 +92,6 @@
 
 #define CONFIG_HOSTNAME                bf561-acvilon
 
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR                              02:80:ad:20:31:e8 */
-
 
 /*
  * Flash Settings
index fb6f94873af222f5e4d25a4790bf647ff0c42e0a..efbc6c21d9555df87c5a6e9239b40804863f74cb 100644 (file)
@@ -64,8 +64,6 @@
 #define CONFIG_SMC91111_BASE   0x2C010300
 #define CONFIG_SMC_USE_32_BIT  1
 #define CONFIG_HOSTNAME                bf561-ezkit
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index 7de425349fb46be5b00ffb9f1bd590f49d423f13..28bc653442b8e7ff92c2cfce3ee236b68a8d875e 100644 (file)
@@ -76,9 +76,6 @@
 #define CONFIG_HOSTNAME                blackstamp
 #define CONFIG_ROOTPATH                "/checkout/uClinux-dist/romfs"
 #define CONFIG_SYS_AUTOLOAD            "no"
-
-/* To remove hardcoding and enable MAC storage in EEPROM  */
-/* #define CONFIG_ETHADDR              02:80:ad:20:31:b8 */
 #endif
 
 #define CONFIG_ENV_IS_IN_SPI_FLASH
index 6e5774c6ba5fc29abcf309a0771c7ea8940d11b5..27dccf65c425e6af5083daf1b13ef3c42faddc92 100644 (file)
@@ -85,9 +85,6 @@
 #define CFG_AUTOLOAD           "no"
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
-#define CONFIG_ENV_OVERWRITE   1       /* enable changing MAC at runtime */
-/* Comment out hardcoded MAC to enable MAC storage in EEPROM */
-/* # define CONFIG_ETHADDR     ff:ee:dd:cc:bb:aa */
 
 /*
  * SDRAM settings & memory map
index 48cf184826d979b0e93f796faf999b97ac0db92b..a44c18c66e1efc368db7b1e61c8dbd14b5131a52 100644 (file)
@@ -69,9 +69,6 @@
 #endif
 #define CONFIG_HOSTNAME                br4
 #define CONFIG_TFTP_BLOCKSIZE  4404
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      5c:38:1a:80:a7:00 */
-
 
 /*
  * Flash Settings
index 643c8379aad6207877321826ef5fecd74a341206..387f1cb767438a47fbb4a0b5af65154a41605966 100644 (file)
@@ -83,8 +83,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                cm-bf527
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 485f01a01c04f6f76bdd2e7e39d6cf6eb06679d1..a4647858dd2a4fc1c8de1f40297279cde62c6a92 100644 (file)
@@ -66,8 +66,6 @@
 #define CONFIG_SMC91111        1
 #define CONFIG_SMC91111_BASE   0x20200300
 #define CONFIG_HOSTNAME                cm-bf533
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index e05956846c92436ae2281605807fc068d9e8b0b8..95afd512171f0c5b12fcc7c5952c1c76a0f8d46b 100644 (file)
@@ -71,8 +71,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                cm-bf537e
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 1f26457a955abc3ec96c3c2f5814d477fd4924b7..4df4a05c7ddaeb00393b2443d2147bafb83e9a68 100644 (file)
@@ -69,8 +69,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                cm-bf537u
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index 72eafc5699b57f5dc578fad441a733f4a66b21e5..cde23ada40001e35e8e426f3559c9cc321c4106f 100644 (file)
@@ -76,8 +76,6 @@
 #define CONFIG_SMC911X_BASE    0x24000000
 #define CONFIG_SMC911X_16_BIT
 #define CONFIG_HOSTNAME                cm-bf548
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:24:31:91 */
 
 
 /*
index 96910a7afd27cab60ddbc1241277b20c01a32088..9d8a2c613fee45ecb79e596a1571b697f08b315e 100644 (file)
@@ -67,8 +67,6 @@
 #define CONFIG_SMC911X_BASE    0x24008000 /* AMS1 */
 #define CONFIG_SMC911X_16_BIT
 #define CONFIG_HOSTNAME                cm-bf561
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:cf */
 
 
 /*
index 38fcc40d9fea39540e900f7544a5fe713d3e56b9..11dd4d712be372533e64fb2f008e7d3063b97f0e 100644 (file)
@@ -177,7 +177,6 @@ considered during boot */
 
 /* User network settings */
 
-#define CONFIG_ETHADDR 00:00:00:00:00:09       /* default ethernet MAC addr. */
 #define CONFIG_IPADDR 192.168.100.2            /* default board IP address */
 #define CONFIG_SERVERIP 192.168.100.1  /* default tftp server IP address */
 
index 56317ef5e705a5cf3bccad1a9ae1a9383848da36..70aa699c4a98ad3af6bb2764155af3af85245ede 100644 (file)
@@ -37,8 +37,6 @@
 #endif
 #endif
 
-#define CONFIG_ETHADDR         DE:AD:BE:EF:01:01    /* Ethernet address */
-
 #define CONFIG_BOOTDELAY       2       /* autoboot after 2 seconds     */
 
 #define CONFIG_BAUDRATE                115200
index ae89368bfba18b9738976e74fd85401b4b328e43..fc02b30af73cbf505640ed766a2aa1786f16bed1 100644 (file)
        "rootpath=/opt/eldk/arm\0"                                      \
        "splashpos=230,180\0"                                           \
        "testrfspath=/opt/eldk/test_arm\0"                              \
-       "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0"                    \
        "nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc "    \
        "ubi.mtd=${as} root=ubi0:rootfs\0"                              \
        "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc "  \
                "fi;"                                                   \
                "else echo U-Boot not downloaded..exiting;fi\0" \
        "ubootupd_nand=echo run load_magic,run load_nand,run upd;\0"    \
-       "bootcmd=run tempmac;run net_testrfs\0"
+       "bootcmd=run net_testrfs\0"
 
 #endif /* __CONFIG_H */
index 854807d486846ee9f0525e8209e4998bd88899a6..5d28d8bf081ffc654b516085015197db38d9adc7 100644 (file)
 /*#define CONFIG_SHOW_ACTIVITY*/
 #define CONFIG_NET_RETRY_COUNT         10      /* # of retries          */
 
-#define CONFIG_ETHADDR   00:00:7a:cc:00:13
 #define CONFIG_PHY_ADDR         0x00
 
 /*
index ed2dd2a847be9e231d43c47f67ab770ee2af9132..7c320eeb64c29b94489ece916c5629dd1802e9a7 100644 (file)
 /* USE GRETH Ethernet Driver */
 #define CONFIG_GRETH   1
 
-/* Default GRETH Ethernet HARDWARE address */
-#define GRETH_HWADDR_0 0x00
-#define GRETH_HWADDR_1 0x00
-#define GRETH_HWADDR_2 0x7a
-#define GRETH_HWADDR_3 0xcc
-#define GRETH_HWADDR_4 0x00
-#define GRETH_HWADDR_5 0x13
-#endif
-
-#define CONFIG_ETHADDR   00:00:7a:cc:00:13
 #define CONFIG_PHY_ADDR         0x00
 
 /*
index e3cbb6f5965af7fa89eff870caac14a020092d6c..fdd0aa5455cbecddf4caee12e0db096c64219c2a 100644 (file)
  */
 #define CONFIG_GRETH   1
 
-/* Default GRETH Ethernet HARDWARE address */
-#define GRETH_HWADDR_0 0x00
-#define GRETH_HWADDR_1 0x00
-#define GRETH_HWADDR_2 0x7a
-#define GRETH_HWADDR_3 0xcc
-#define GRETH_HWADDR_4 0x00
-#define GRETH_HWADDR_5 0x12
-
-#define CONFIG_ETHADDR   00:00:7a:cc:00:12
 #define CONFIG_PHY_ADDR         0x00
 
 /*
index 1e089a9bf7545530ed43c38ed51e79d4ed090db0..21b4f5e5d4ddd2fa6d51202cb72b9a11fb0ba328 100644 (file)
@@ -94,7 +94,6 @@
        "rootpath=/export/roofs\0"                                      \
        "scratch=40000000\0"                                    \
        "getkernel=tftpboot $(scratch) $(bootfile)\0" \
-       "ethaddr=00:00:7A:CC:00:12\0" \
        "bootargs=console=ttyS0,38400" \
        ""
 #define CONFIG_NETMASK 255.255.255.0
  */
 #define CONFIG_GRETH   1
 
-/* Default HARDWARE address */
-#define GRETH_HWADDR_0 0x00
-#define GRETH_HWADDR_1 0x00
-#define GRETH_HWADDR_2 0x7A
-#define GRETH_HWADDR_3 0xcc
-#define GRETH_HWADDR_4 0x00
-#define GRETH_HWADDR_5 0x12
-
-#define CONFIG_ETHADDR   00:00:7a:cc:00:12
-
 /*
  * Define CONFIG_GRETH_10MBIT to force GRETH at 10Mb/s
  */
index 66194a8ff0e173e2a9e64caae7abeda42f6a996d..f050754a75b5e3ac9f0220ed5cb600839ddd4e56 100644 (file)
@@ -91,7 +91,6 @@
        "rootpath=/export/roofs\0"                                      \
        "scratch=40000000\0"                                    \
        "getkernel=tftpboot $(scratch) $(bootfile)\0" \
-       "ethaddr=00:00:7A:CC:00:12\0" \
        "bootargs=console=ttyS0,38400" \
        ""
 #define CONFIG_NETMASK 255.255.255.0
  */
 /*#define CONFIG_GRETH 1*/
 
-/* Default HARDWARE address */
-#define GRETH_HWADDR_0 0x00
-#define GRETH_HWADDR_1 0x00
-#define GRETH_HWADDR_2 0x7A
-#define GRETH_HWADDR_3 0xcc
-#define GRETH_HWADDR_4 0x00
-#define GRETH_HWADDR_5 0x12
-
-#define CONFIG_ETHADDR   00:00:7a:cc:00:12
-
 /*
  * Define CONFIG_GRETH_10MBIT to force GRETH at 10Mb/s
  */
index 2a937c6a2212fea8565261a919163a20222a9d40..47579296184b4db96f00eb484a2fb1e9e8419530 100644 (file)
@@ -64,8 +64,6 @@
 #define CONFIG_DRIVER_AX88180  1
 #define AX88180_BASE           0x2c000000
 #define CONFIG_HOSTNAME                ibf-dsp561
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index f321975c478d681472ee0554d9f98ae95ed4caca..92587349d12419e4b035aa943869ead6d6306115 100644 (file)
 
 #undef CONFIG_BOOTARGS
 
-#define        CONFIG_ETHADDR          00:a0:a4:03:00:00
-#define        CONFIG_OVERWRITE_ETHADDR_ONCE
-
 #define        CONFIG_IPADDR           192.168.100.2
 #define        CONFIG_SERVERIP         192.168.100.1
 #define        CONFIG_NETMASK          255.255.255.0
index 2ee215f70614dfb44b7179e8247dc2936329e768..2bd81fc5cf2b1f4bf5e9e8b892f1cda63329ca47 100644 (file)
  * Misc Settings
  */
 #define CONFIG_BAUDRATE                115200
-#define CONFIG_MISC_INIT_R     /* needed for MAC address */
 #define CONFIG_UART_CONSOLE    0
 
 #undef CONFIG_SHOW_BOOT_PROGRESS
index c354c292960ad511049e4acbe4f0fac5ee673d1d..490f84eb7528eb582268952e7755a0bec9855a08 100644 (file)
@@ -37,7 +37,6 @@
 #define CONFIG_MISC_INIT_R
 #define CONFIG_SHOW_BOOT_PROGRESS
 
-#define CONFIG_RANDOM_MACADDR
 #define CONFIG_LIB_RAND
 #define CONFIG_KIRKWOOD_GPIO
 #define CONFIG_OF_LIBFDT
index 166ab4f05654e9e1a1a970989cb0be808c7e4c68..b84eead661ed7f7f34def37ac7c93c6e052f0595 100644 (file)
 #define        CONFIG_IPADDR           192.168.0.3
 #define        CONFIG_SERVERIP         192.168.0.5
 #define        CONFIG_GATEWAYIP        192.168.0.1
-#define        CONFIG_ETHADDR          00:E0:0C:00:00:FD
 
 /* architecture dependent code */
 #define        CONFIG_SYS_USR_EXCEP    /* user exception */
index e8b05932a13a847ee329181292c11927b6521262..4d648c8a14f8094b47018fb56b9b80f76b7f5956 100644 (file)
@@ -85,8 +85,6 @@
 #define        CONFIG_SYS_HUSH_PARSER          1       /* use "hush" command parser    */
 #define        CONFIG_SYS_PROMPT_HUSH_PS2      "> "
 
-#define CONFIG_ETHADDR         00:50:C2:40:10:00
-#define CONFIG_OVERWRITE_ETHADDR_ONCE  1
 #define CONFIG_VERSION_VARIABLE        1       /* include version env variable */
 
 /*
index 3030054949f8fdea5228b616bee0811cfb5e667e..20826790fa9437b598e63a3e4a1156bed3c4e039 100644 (file)
@@ -90,7 +90,6 @@
        "machid=ffffffff\0" \
        "fdt_high=0x87000000\0" \
        "baudrate=115200\0" \
-       "ethaddr=00:50:C2:7E:90:F0\0" \
        "fec_addr=00:50:C2:7E:90:F0\0" \
        "netmask=255.255.255.0\0" \
        "ipaddr=192.168.2.9\0" \
index a1926bb64d08115a4447f24d316ee253a2de202e..2508702a4a1448c1fcf0836ebf3e4bc363ec6b27 100644 (file)
@@ -31,8 +31,6 @@
 #endif
 #endif
 
-#define CONFIG_ETHADDR         DE:AD:BE:EF:01:01    /* Ethernet address */
-
 #define CONFIG_BOOTDELAY       2       /* autoboot after 2 seconds     */
 
 #define CONFIG_BAUDRATE                115200
index 13fb675a5fdc9033123ebb4bb585eb0d98a9590a..b9253b96844a9bfd7512242bd331edd33f88c1a3 100644 (file)
@@ -69,8 +69,6 @@
 #endif
 #define CONFIG_HOSTNAME                pr1
 #define CONFIG_TFTP_BLOCKSIZE  4404
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 
 
 /*
index 69dc210917802a3d0bdd85f3c315f27701396bc0..11bf5048324989dea5ed732bb6425aa32c189918 100644 (file)
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
 
-#define CONFIG_ETHADDR DE:AD:BE:EF:01:01       /* Ethernet address     */
 #define CONFIG_IPADDR          192.168.193.102
 #define CONFIG_NETMASK         255.255.255.224
 #define CONFIG_SERVERIP                192.168.193.119
index aee0d9e273097b7a92bd43c4aa72a5b6d1f5f87b..5b373cb0f1e0bd7afe4dd39af7b7080659c78191 100644 (file)
 /*
  * Environment Configuration
  */
-
-/* The mac addresses for all ethernet interface */
 #if defined(CONFIG_TSEC_ENET)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR  02:E0:0C:00:00:FD
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR         02:E0:0C:00:01:FD
 #endif
 
 #define CONFIG_IPADDR   192.168.0.55
index 8eb7276618b0ac793b37eecdf8af9491283883d1..021da50aa83144f37dc27f3850d82334f223b3e2 100644 (file)
@@ -14,7 +14,7 @@
  * SBC8641D board configuration file
  *
  * Make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR, CONFIG_SERVERIP, etc in this file.
+ * search for CONFIG_SERVERIP, etc in this file.
  */
 
 #ifndef __CONFIG_H
  * Environment Configuration
  */
 
-/* The mac addresses for all ethernet interface */
-#if defined(CONFIG_TSEC_ENET)
-#define CONFIG_ETHADDR   02:E0:0C:00:00:01
-#define CONFIG_ETH1ADDR  02:E0:0C:00:01:FD
-#define CONFIG_ETH2ADDR  02:E0:0C:00:02:FD
-#define CONFIG_ETH3ADDR  02:E0:0C:00:03:FD
-#endif
-
 #define CONFIG_HAS_ETH0                1
 #define CONFIG_HAS_ETH1                1
 #define CONFIG_HAS_ETH2                1
index f4a40bb9324717e8b83501b09bb3183a976f587a..6cac99e0428d7a897f8537dd2b21b59803fdd56c 100644 (file)
@@ -50,7 +50,6 @@
 #define CONFIG_BOOTARGS           "console=ttySMX0,115200n8 root=/dev/mtdblock3 rootfstype=jffs2 mtdparts=scb9328_flash:128k(U-boot)ro,128k(U-boot_env),1m(kernel),4m(root),4m(fs) eval_board=evk9328"
 #define CONFIG_BOOTCOMMAND "bootm 10040000"
 #define CONFIG_SHOW_BOOT_PROGRESS
-#define CONFIG_ETHADDR         80:81:82:83:84:85
 #define CONFIG_NETMASK         255.255.255.0
 #define CONFIG_IPADDR          10.10.10.9
 #define CONFIG_SERVERIP                10.10.10.10
index b6a5e6a59c98cadc2abb045d0e64756c7d8b1953..623be7d39bcf1b9869f2c6f611ac5ab037281b09 100644 (file)
 #if defined(CONFIG_SYS_RAMBOOT)
 #define CONFIG_ENV_IS_NOWHERE          /* Store env in memory only     */
 #define CONFIG_ENV_SIZE                (8 << 10)
-/*
- * In RAM-booting version, we have no environment storage. So we need to
- * provide at least preliminary MAC addresses for the 4xx EMAC driver to
- * register the interfaces. Those two addresses are generated via the
- * tools/gen_eth_addr tool and should only be used in a closed laboratory
- * environment.
- */
-#define        CONFIG_ETHADDR          4a:56:49:22:3e:43
-#define        CONFIG_ETH1ADDR         02:93:53:d5:06:98
 #else
 #define CONFIG_ENV_IS_IN_FLASH         /* use FLASH for environ vars   */
 #endif
index 5fb40ebf8ba534e791b02d79a596b4a12c7bc67b..a0817a0f80acbc870c5f89080c3eec43a7b2cb30 100644 (file)
@@ -13,7 +13,7 @@
 /* mpc8560ads board configuration file */
 /* please refer to doc/README.mpc85xx for more info */
 /* make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR,CONFIG_SERVERIP,etc in this file
+ * search for CONFIG_SERVERIP, etc. in this file
  */
 
 #ifndef __CONFIG_H
 #define CONFIG_KGDB_BAUDRATE   230400  /* speed to run kgdb serial port */
 #endif
 
-/*Note: change below for your network setting!!! */
 #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR          00:e0:0c:07:9b:8a
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR                 00:e0:0c:07:9b:8b
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR                 00:e0:0c:07:9b:8c
 #endif
 
 #define CONFIG_SERVERIP                192.168.85.1
index 914d82190597110e9b2d23e01ba8c2ef10bb3085..78ac0801d58cec1bb367d147e8c1ab9a10a15507 100644 (file)
@@ -13,7 +13,7 @@
 /* mpc8560ads board configuration file */
 /* please refer to doc/README.mpc85xx for more info */
 /* make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR,CONFIG_SERVERIP,etc in this file
+ * search for CONFIG_SERVERIP, etc. in this file
  */
 
 #ifndef __CONFIG_H
 #define CONFIG_KGDB_BAUDRATE   230400  /* speed to run kgdb serial port */
 #endif
 
-/*Note: change below for your network setting!!! */
 #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
 #define CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR  00:e0:0c:07:9b:8a
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR  00:e0:0c:07:9b:8b
 #define CONFIG_HAS_ETH2
-#define CONFIG_ETH2ADDR  00:e0:0c:07:9b:8c
 #endif
 
 /*
index e96a7427e5864c64280e0c3dc2eb38f0645ef484..e726b29da561c2be88ea340812b75e8337b6650d 100644 (file)
@@ -66,8 +66,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                tcm-bf518
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
  * Misc Settings
  */
 #define CONFIG_BAUDRATE                115200
-#define CONFIG_MISC_INIT_R
 #define CONFIG_RTC_BFIN
 #define CONFIG_UART_CONSOLE    0
 #define CONFIG_BOOTCOMMAND     "run flashboot"
index 42129fb7d8419e83ca2eb3883c5e6cd31a60ba39..33265801a6bbbe98c84f6019f00a046f60cb7969 100644 (file)
@@ -71,8 +71,6 @@
 #define CONFIG_NETCONSOLE      1
 #endif
 #define CONFIG_HOSTNAME                tcm-bf537
-/* Uncomment next line to use fixed MAC address */
-/* #define CONFIG_ETHADDR      02:80:ad:20:31:e8 */
 #define CONFIG_LIB_RAND
 
 /*
index d4688c54bab94125009ff8db8d71539c801be19d..331df6251a4db7fbe992413345b465ab466275d5 100644 (file)
 /*
  * Network Configuration
  */
-#define CONFIG_ETHADDR                 00:21:83:24:00:00
 #define CONFIG_SERVERIP                        192.168.11.1
 #define CONFIG_IPADDR                  192.168.11.10
 #define CONFIG_GATEWAYIP               192.168.11.1
index 7f6b0c7cb2650e7675150dabe1f0792b3eb2336c..688d60e8fb97be1ee2b5b796cf2c36c55f13563e 100644 (file)
        "netmask=255.255.0.0\0"                                         \
        "ipaddr=192.168.160.18\0"                                       \
        "serverip=192.168.1.1\0"                                        \
-       "ethaddr=00:e0:ee:00:05:2e\0"                                   \
        "bootfile=/tftpboot/v38b/uImage\0"                              \
        "u-boot=/tftpboot/v38b/u-boot.bin\0"                            \
        ""
index dc8e99fffdfad8a945d766d808ddd844d0b3e1c3..4725fc3d895116988d9ddd7fd521af99e74b420b 100644 (file)
 #define CONFIG_ENV_OFFSET_REDUND       0x00120000
 #define CONFIG_ENV_ADDR                        0x80000100
 
-/*
- * Provide default ethernet address
- *
- * THIS IS NORMALLY NOT DONE. HERE WE KEEP WHAT WAS IN THE PORTED
- * BOARD CONFIG IN CASE SOME PROVISIONING PROCESS OUT THERE EXPECTS
- * THIS MAC ADDRESS WHEN THE DEVICE HAS STILL ITS DEFAULT CONFIG.
- */
-
-#define CONFIG_ETHADDR                 00:12:B4:00:AF:FE
-#define        CONFIG_OVERWRITE_ETHADDR_ONCE
-
 /*
  * U-Boot Commands
  */
index 2999d1b0f54ddd55e7473c83878c6644aec296f6..fcb76a27a273d61799abaabb6dbf27c937707e89 100644 (file)
@@ -70,7 +70,6 @@
 #undef CONFIG_CMD_DTT
 
 
-#define CONFIG_ETHADDR         08:00:3e:26:0a:5b
 #define CONFIG_NETMASK         255.255.255.0
 #define CONFIG_IPADDR          192.168.68.201
 #define CONFIG_SERVERIP                192.168.68.62
index 4d7a7fc75559af286beb52e5263ef846d76d2a98..9ac4a0f04a81fc9bb58e899832f5c68037c38ae7 100644 (file)
 #define CONFIG_IPADDR          192.168.1.10
 #define CONFIG_SERVERIP                192.168.1.100
 #define CONFIG_GATEWAYIP       192.168.1.100
-#define CONFIG_ETHADDR         50:00:00:00:06:00
-#define CONFIG_ETH1ADDR                50:00:00:00:06:01
 #if 0
 #define CONFIG_BOOTDELAY       -1      /* autoboot disabled        */
 #else
index 90431beb192db11a16fef8ba8108a65ef5b19392..3096576836addf602971e6ea492c9588d55d9a31 100644 (file)
@@ -49,24 +49,6 @@ const uchar default_environment[] = {
 #ifdef CONFIG_LOADS_ECHO
        "loads_echo="   __stringify(CONFIG_LOADS_ECHO)  "\0"
 #endif
-#ifdef CONFIG_ETHADDR
-       "ethaddr="      __stringify(CONFIG_ETHADDR)     "\0"
-#endif
-#ifdef CONFIG_ETH1ADDR
-       "eth1addr="     __stringify(CONFIG_ETH1ADDR)    "\0"
-#endif
-#ifdef CONFIG_ETH2ADDR
-       "eth2addr="     __stringify(CONFIG_ETH2ADDR)    "\0"
-#endif
-#ifdef CONFIG_ETH3ADDR
-       "eth3addr="     __stringify(CONFIG_ETH3ADDR)    "\0"
-#endif
-#ifdef CONFIG_ETH4ADDR
-       "eth4addr="     __stringify(CONFIG_ETH4ADDR)    "\0"
-#endif
-#ifdef CONFIG_ETH5ADDR
-       "eth5addr="     __stringify(CONFIG_ETH5ADDR)    "\0"
-#endif
 #ifdef CONFIG_ETHPRIME
        "ethprime="     CONFIG_ETHPRIME                 "\0"
 #endif
index 22b9eaac53a2880a45b1d06f548e8a59c88256f1..a2bd4fe580b0063914ee37ebedad55a74663f4d1 100644 (file)
@@ -7,4 +7,12 @@ menuconfig NET
 
 if NET
 
+config NET_RANDOM_ETHADDR
+       bool "Random ethaddr if unset"
+       help
+         Selecting this will allow the Ethernet interface to function
+         even when the ethaddr variable for that interface is unset.
+         A new MAC address will be generated on every boot and it will
+         not be added to the environment.
+
 endif   # if NET
index 8e6acfef89c25170f79728aad5e1ab3c9d7445b4..6c49db583b60d92615ba3ad42f349068c7374c3a 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -281,6 +281,31 @@ int eth_get_dev_index(void)
        return -1;
 }
 
+static int eth_write_hwaddr(struct udevice *dev)
+{
+       struct eth_pdata *pdata = dev->platdata;
+       int ret = 0;
+
+       if (!dev || !device_active(dev))
+               return -EINVAL;
+
+       /* seq is valid since the device is active */
+       if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) {
+               if (!is_valid_ethaddr(pdata->enetaddr)) {
+                       printf("\nError: %s address %pM illegal value\n",
+                              dev->name, pdata->enetaddr);
+                       return -EINVAL;
+               }
+
+               ret = eth_get_ops(dev)->write_hwaddr(dev);
+               if (ret)
+                       printf("\nWarning: %s failed to set MAC address\n",
+                              dev->name);
+       }
+
+       return ret;
+}
+
 int eth_init(void)
 {
        struct udevice *current;
@@ -300,13 +325,22 @@ int eth_init(void)
                if (device_active(current)) {
                        uchar env_enetaddr[6];
                        struct eth_pdata *pdata = current->platdata;
+                       int enetaddr_changed = 0;
 
                        /* Sync environment with network device */
                        if (eth_getenv_enetaddr_by_index("eth", current->seq,
-                                                        env_enetaddr))
+                                                        env_enetaddr)) {
+                               enetaddr_changed = memcmp(pdata->enetaddr,
+                                       env_enetaddr, 6);
                                memcpy(pdata->enetaddr, env_enetaddr, 6);
-                       else
+                       } else {
+                               memset(env_enetaddr, 0, 6);
+                               enetaddr_changed = memcmp(pdata->enetaddr,
+                                       env_enetaddr, 6);
                                memset(pdata->enetaddr, 0, 6);
+                       }
+                       if (enetaddr_changed)
+                               eth_write_hwaddr(current);
 
                        ret = eth_get_ops(current)->start(current);
                        if (ret >= 0) {
@@ -401,31 +435,6 @@ int eth_rx(void)
        return ret;
 }
 
-static int eth_write_hwaddr(struct udevice *dev)
-{
-       struct eth_pdata *pdata = dev->platdata;
-       int ret = 0;
-
-       if (!dev || !device_active(dev))
-               return -EINVAL;
-
-       /* seq is valid since the device is active */
-       if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) {
-               if (!is_valid_ethaddr(pdata->enetaddr)) {
-                       printf("\nError: %s address %pM illegal value\n",
-                              dev->name, pdata->enetaddr);
-                       return -EINVAL;
-               }
-
-               ret = eth_get_ops(dev)->write_hwaddr(dev);
-               if (ret)
-                       printf("\nWarning: %s failed to set MAC address\n",
-                              dev->name);
-       }
-
-       return ret;
-}
-
 int eth_initialize(void)
 {
        int num_devices = 0;
@@ -529,9 +538,15 @@ static int eth_post_probe(struct udevice *dev)
                printf("\nWarning: %s using MAC address from ROM\n",
                       dev->name);
        } else if (is_zero_ethaddr(pdata->enetaddr)) {
+#ifdef CONFIG_NET_RANDOM_ETHADDR
+               net_random_ethaddr(pdata->enetaddr);
+               printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
+                      dev->name, dev->seq, pdata->enetaddr);
+#else
                printf("\nError: %s address not set.\n",
                       dev->name);
                return -EINVAL;
+#endif
        }
 
        return 0;
@@ -657,9 +672,15 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
                printf("\nWarning: %s using MAC address from net device\n",
                       dev->name);
        } else if (is_zero_ethaddr(dev->enetaddr)) {
+#ifdef CONFIG_NET_RANDOM_ETHADDR
+               net_random_ethaddr(dev->enetaddr);
+               printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
+                      dev->name, eth_number, dev->enetaddr);
+#else
                printf("\nError: %s address not set.\n",
                       dev->name);
                return -EINVAL;
+#endif
        }
 
        if (dev->write_hwaddr && !eth_mac_skip(eth_number)) {
@@ -834,10 +855,21 @@ int eth_init(void)
        dev = eth_devices;
        do {
                uchar env_enetaddr[6];
+               int enetaddr_changed = 0;
 
                if (eth_getenv_enetaddr_by_index("eth", dev->index,
-                                                env_enetaddr))
+                                                env_enetaddr)) {
+                       enetaddr_changed = memcmp(dev->enetaddr,
+                               env_enetaddr, 6);
                        memcpy(dev->enetaddr, env_enetaddr, 6);
+               } else {
+                       memset(env_enetaddr, 0, 6);
+                       enetaddr_changed = memcmp(dev->enetaddr,
+                               env_enetaddr, 6);
+                       memset(dev->enetaddr, 0, 6);
+               }
+               if (enetaddr_changed)
+                       eth_write_hwaddr(dev, "eth", dev->index);
 
                dev = dev->next;
        } while (dev != eth_devices);