diff options
author | Tom Rini <trini@konsulko.com> | 2015-05-20 15:57:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-20 15:57:55 -0400 |
commit | 3238639d40732fe78fd62ae5e080465552e882fc (patch) | |
tree | b9f0f8565adf69504faf56fc7032068573e5fabe | |
parent | cb0892b968e52fe0d09b4d51119d8f913685ed3c (diff) | |
parent | 76ec988b062ed880ab23d0e0d4e9e6c137b55cc3 (diff) | |
download | u-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.zip u-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.tar.gz u-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.tar.bz2 |
Merge git://git.denx.de/u-boot-net
126 files changed, 267 insertions, 659 deletions
@@ -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 diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c index 1f0dfb4..bf7cd62 100644 --- a/board/bct-brettl2/bct-brettl2.c +++ b/board/bct-brettl2/bct-brettl2.c @@ -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(); diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 8ecfbb2..bf4a7db 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -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 */ diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c index 0a88491..db1ee28 100644 --- a/board/bf526-ezbrd/bf526-ezbrd.c +++ b/board/bf526-ezbrd/bf526-ezbrd.c @@ -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) diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index 257775f..b551d4e 100644 --- a/board/bf527-ezkit/bf527-ezkit.c +++ b/board/bf527-ezkit/bf527-ezkit.c @@ -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) diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c index 71b4293..9312216 100644 --- a/board/bf537-minotaur/bf537-minotaur.c +++ b/board/bf537-minotaur/bf537-minotaur.c @@ -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; -} diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c index 93522df..6739fe1 100644 --- a/board/bf537-pnav/bf537-pnav.c +++ b/board/bf537-pnav/bf537-pnav.c @@ -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; -} diff --git a/board/bf537-srv1/bf537-srv1.c b/board/bf537-srv1/bf537-srv1.c index 6581028..b0ffe1a 100644 --- a/board/bf537-srv1/bf537-srv1.c +++ b/board/bf537-srv1/bf537-srv1.c @@ -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; -} diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c index 66e5492..85d41d0 100644 --- a/board/bf537-stamp/bf537-stamp.c +++ b/board/bf537-stamp/bf537-stamp.c @@ -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) diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 487875c..45dd788 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -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"); } diff --git a/board/cm-bf527/cm-bf527.c b/board/cm-bf527/cm-bf527.c index 2871fa2..3186c67 100644 --- a/board/cm-bf527/cm-bf527.c +++ b/board/cm-bf527/cm-bf527.c @@ -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) diff --git a/board/cm-bf537e/cm-bf537e.c b/board/cm-bf537e/cm-bf537e.c index 902611e..57c72a2 100644 --- a/board/cm-bf537e/cm-bf537e.c +++ b/board/cm-bf537e/cm-bf537e.c @@ -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; diff --git a/board/cm-bf537u/cm-bf537u.c b/board/cm-bf537u/cm-bf537u.c index 69bffd7..f365cdb 100644 --- a/board/cm-bf537u/cm-bf537u.c +++ b/board/cm-bf537u/cm-bf537u.c @@ -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; diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c index 655fcac..ae9ba84 100644 --- a/board/dnp5370/dnp5370.c +++ b/board/dnp5370/dnp5370.c @@ -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) diff --git a/board/ip04/ip04.c b/board/ip04/ip04.c index d20500f..70765bc 100644 --- a/board/ip04/ip04.c +++ b/board/ip04/ip04.c @@ -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 diff --git a/board/tcm-bf518/tcm-bf518.c b/board/tcm-bf518/tcm-bf518.c index 3fa7d97..4348678 100644 --- a/board/tcm-bf518/tcm-bf518.c +++ b/board/tcm-bf518/tcm-bf518.c @@ -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) { diff --git a/board/tcm-bf537/tcm-bf537.c b/board/tcm-bf537/tcm-bf537.c index 2531a44..2cf70ca 100644 --- a/board/tcm-bf537/tcm-bf537.c +++ b/board/tcm-bf537/tcm-bf537.c @@ -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; diff --git a/configs/bct-brettl2_defconfig b/configs/bct-brettl2_defconfig index 26b145d..84eb1fe 100644 --- a/configs/bct-brettl2_defconfig +++ b/configs/bct-brettl2_defconfig @@ -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 diff --git a/configs/bf518f-ezbrd_defconfig b/configs/bf518f-ezbrd_defconfig index fb35ad0..51f93f8 100644 --- a/configs/bf518f-ezbrd_defconfig +++ b/configs/bf518f-ezbrd_defconfig @@ -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 diff --git a/configs/bf526-ezbrd_defconfig b/configs/bf526-ezbrd_defconfig index da06d3a..245faac 100644 --- a/configs/bf526-ezbrd_defconfig +++ b/configs/bf526-ezbrd_defconfig @@ -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 diff --git a/configs/bf527-ezkit_defconfig b/configs/bf527-ezkit_defconfig index 69f6ef7..0451c64 100644 --- a/configs/bf527-ezkit_defconfig +++ b/configs/bf527-ezkit_defconfig @@ -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 diff --git a/configs/bf537-minotaur_defconfig b/configs/bf537-minotaur_defconfig index e76118f..1f398a0 100644 --- a/configs/bf537-minotaur_defconfig +++ b/configs/bf537-minotaur_defconfig @@ -1,2 +1,4 @@ CONFIG_BLACKFIN=y +CONFIG_NET=y CONFIG_TARGET_BF537_MINOTAUR=y +CONFIG_NET_RANDOM_ETHADDR=y diff --git a/configs/bf537-pnav_defconfig b/configs/bf537-pnav_defconfig index ba5eaaa..6372258 100644 --- a/configs/bf537-pnav_defconfig +++ b/configs/bf537-pnav_defconfig @@ -1,2 +1,4 @@ CONFIG_BLACKFIN=y +CONFIG_NET=y CONFIG_TARGET_BF537_PNAV=y +CONFIG_NET_RANDOM_ETHADDR=y diff --git a/configs/bf537-srv1_defconfig b/configs/bf537-srv1_defconfig index 61ac0e7..f007c82 100644 --- a/configs/bf537-srv1_defconfig +++ b/configs/bf537-srv1_defconfig @@ -1,2 +1,4 @@ CONFIG_BLACKFIN=y +CONFIG_NET=y CONFIG_TARGET_BF537_SRV1=y +CONFIG_NET_RANDOM_ETHADDR=y diff --git a/configs/bf537-stamp_defconfig b/configs/bf537-stamp_defconfig index 9b9a92f..50483b1 100644 --- a/configs/bf537-stamp_defconfig +++ b/configs/bf537-stamp_defconfig @@ -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 diff --git a/configs/cm-bf527_defconfig b/configs/cm-bf527_defconfig index a6830b5..5bceb17 100644 --- a/configs/cm-bf527_defconfig +++ b/configs/cm-bf527_defconfig @@ -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 diff --git a/configs/cm-bf537e_defconfig b/configs/cm-bf537e_defconfig index a44eab7..fd9dd00 100644 --- a/configs/cm-bf537e_defconfig +++ b/configs/cm-bf537e_defconfig @@ -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 diff --git a/configs/cm-bf537u_defconfig b/configs/cm-bf537u_defconfig index 29c33b9..4a8f123 100644 --- a/configs/cm-bf537u_defconfig +++ b/configs/cm-bf537u_defconfig @@ -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 diff --git a/configs/dnp5370_defconfig b/configs/dnp5370_defconfig index 0c00087..c7104ca 100644 --- a/configs/dnp5370_defconfig +++ b/configs/dnp5370_defconfig @@ -1,2 +1,4 @@ CONFIG_BLACKFIN=y +CONFIG_NET=y CONFIG_TARGET_DNP5370=y +CONFIG_NET_RANDOM_ETHADDR=y diff --git a/configs/ip04_defconfig b/configs/ip04_defconfig index ba737ae..69110a3 100644 --- a/configs/ip04_defconfig +++ b/configs/ip04_defconfig @@ -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 diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig index efd8fca..31452a3 100644 --- a/configs/lschlv2_defconfig +++ b/configs/lschlv2_defconfig @@ -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 diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig index bb3a80e..00f48bc 100644 --- a/configs/lsxhl_defconfig +++ b/configs/lsxhl_defconfig @@ -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 diff --git a/configs/tcm-bf518_defconfig b/configs/tcm-bf518_defconfig index 0c9ae4d..f16d863 100644 --- a/configs/tcm-bf518_defconfig +++ b/configs/tcm-bf518_defconfig @@ -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 diff --git a/configs/tcm-bf537_defconfig b/configs/tcm-bf537_defconfig index 6d604b6..7f3a3a6 100644 --- a/configs/tcm-bf537_defconfig +++ b/configs/tcm-bf537_defconfig @@ -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 diff --git a/doc/README.enetaddr b/doc/README.enetaddr index 0fafd2c..50e4899 100644 --- a/doc/README.enetaddr +++ b/doc/README.enetaddr @@ -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 diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c index 51d5146..eab4c1f 100644 --- a/drivers/net/bcm-sf2-eth.c +++ b/drivers/net/bcm-sf2-eth.c @@ -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 */ diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 07281a6..ae51cf3 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -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); diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index ccd2131..3c41cec 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -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 */ diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c index 4bae9ad..4f17015 100644 --- a/drivers/net/ftmac110.c +++ b/drivers/net/ftmac110.c @@ -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); diff --git a/drivers/net/greth.c b/drivers/net/greth.c index a93b37a..9bc8a8d 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c @@ -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 */ diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c index 495c088..c4dd01e 100644 --- a/drivers/net/lan91c96.c +++ b/drivers/net/lan91c96.c @@ -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 */ diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 4e1a7fe..f949161 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -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; diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index f5221a3..c8d08e8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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; } diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index ee97079..79452a8 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -29,6 +29,19 @@ /* 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; diff --git a/examples/standalone/README.smc91111_eeprom b/examples/standalone/README.smc91111_eeprom index a2d52e7..f73a8d3 100644 --- a/examples/standalone/README.smc91111_eeprom +++ b/examples/standalone/README.smc91111_eeprom @@ -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 --------------------------------------------------------------------- diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index 7eac03b..d0f4d75 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -74,12 +74,10 @@ #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 diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index 4bba815..a766324 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -95,12 +95,10 @@ #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 diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h index 159d2f8..9946108 100644 --- a/include/configs/M5272C3.h +++ b/include/configs/M5272C3.h @@ -94,12 +94,10 @@ #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 diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h index bc740ae..4d3390b 100644 --- a/include/configs/M5282EVB.h +++ b/include/configs/M5282EVB.h @@ -80,12 +80,10 @@ #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 diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index 0829708..e2dd8e5 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -94,13 +94,10 @@ #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 diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index a42b5f6..5a7597c 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -88,12 +88,10 @@ #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 diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index c142dfb..7550c57 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -88,12 +88,10 @@ #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 diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h index 3a6e981..25b3cda 100644 --- a/include/configs/M54418TWR.h +++ b/include/configs/M54418TWR.h @@ -113,15 +113,12 @@ "::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 diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h index 1b3598a..f3cade3 100644 --- a/include/configs/M54451EVB.h +++ b/include/configs/M54451EVB.h @@ -77,13 +77,11 @@ # 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 diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 2288bff..b708001 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -83,14 +83,11 @@ # 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 diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 91d6a1a..658c170 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -75,13 +75,10 @@ # 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 @@ -135,12 +132,10 @@ #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 diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index ce9f3b0..efb64a1 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -75,13 +75,10 @@ # 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 diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index dc09b1f..d41eeb5 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -720,13 +720,9 @@ /* 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 diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h index 37c2b94..b388168 100644 --- a/include/configs/MPC8540ADS.h +++ b/include/configs/MPC8540ADS.h @@ -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 @@ -406,11 +406,8 @@ /* 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 diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h index 5d229a0..609c5bb 100644 --- a/include/configs/MPC8541CDS.h +++ b/include/configs/MPC8541CDS.h @@ -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 diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index dade6d3..479589e 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -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 diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index 190c668..fb28512 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -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 diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h index 5263ffc..48b55b5 100644 --- a/include/configs/MPC8555CDS.h +++ b/include/configs/MPC8555CDS.h @@ -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 diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index ac78d48..92f0b7f 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -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 @@ -443,17 +443,11 @@ /* * 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 diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index 02a5acf..57fc37b 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -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 diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index 5e7bc49..7b3ddba 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -658,17 +658,11 @@ /* * 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 diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index e6d570a..cae133b 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -300,7 +300,6 @@ #define CONFIG_ULI526X #ifdef CONFIG_ULI526X -#define CONFIG_ETHADDR 00:E0:0C:00:00:01 #endif /************************************************************ diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index 9f755e5..938874f 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -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 diff --git a/include/configs/a4m072.h b/include/configs/a4m072.h index 3c67655..00589b7 100644 --- a/include/configs/a4m072.h +++ b/include/configs/a4m072.h @@ -165,7 +165,6 @@ "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" \ "" diff --git a/include/configs/bct-brettl2.h b/include/configs/bct-brettl2.h index 2e0e922..0d9fe57 100644 --- a/include/configs/bct-brettl2.h +++ b/include/configs/bct-brettl2.h @@ -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 diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h index 50e85ca..dcd19e4 100644 --- a/include/configs/bf518f-ezbrd.h +++ b/include/configs/bf518f-ezbrd.h @@ -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 /* diff --git a/include/configs/bf526-ezbrd.h b/include/configs/bf526-ezbrd.h index 7fc882a..ad5fa53 100644 --- a/include/configs/bf526-ezbrd.h +++ b/include/configs/bf526-ezbrd.h @@ -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 /* diff --git a/include/configs/bf527-ezkit.h b/include/configs/bf527-ezkit.h index 79e440a..b23a250 100644 --- a/include/configs/bf527-ezkit.h +++ b/include/configs/bf527-ezkit.h @@ -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 /* diff --git a/include/configs/bf533-ezkit.h b/include/configs/bf533-ezkit.h index 0fda967..1b7290e 100644 --- a/include/configs/bf533-ezkit.h +++ b/include/configs/bf533-ezkit.h @@ -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 */ /* diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h index ae4d83a..322705d 100644 --- a/include/configs/bf533-stamp.h +++ b/include/configs/bf533-stamp.h @@ -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 */ diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h index 6df89af..e705d08 100644 --- a/include/configs/bf537-minotaur.h +++ b/include/configs/bf537-minotaur.h @@ -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 @@ -133,7 +131,6 @@ #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 diff --git a/include/configs/bf537-pnav.h b/include/configs/bf537-pnav.h index 4f2b2cb..be11a85 100644 --- a/include/configs/bf537-pnav.h +++ b/include/configs/bf537-pnav.h @@ -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 /* @@ -150,7 +148,6 @@ * Misc Settings */ #define CONFIG_BAUDRATE 115200 -#define CONFIG_MISC_INIT_R #define CONFIG_RTC_BFIN #define CONFIG_UART_CONSOLE 0 diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h index d01d88f..9a7edf3 100644 --- a/include/configs/bf537-srv1.h +++ b/include/configs/bf537-srv1.h @@ -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 /* @@ -132,7 +130,6 @@ #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 diff --git a/include/configs/bf537-stamp.h b/include/configs/bf537-stamp.h index 7b5a5a7..41f1b1f 100644 --- a/include/configs/bf537-stamp.h +++ b/include/configs/bf537-stamp.h @@ -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 /* diff --git a/include/configs/bf538f-ezkit.h b/include/configs/bf538f-ezkit.h index e60558e..3c82bf2 100644 --- a/include/configs/bf538f-ezkit.h +++ b/include/configs/bf538f-ezkit.h @@ -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 */ /* diff --git a/include/configs/bf548-ezkit.h b/include/configs/bf548-ezkit.h index e71e6d3..53f6558 100644 --- a/include/configs/bf548-ezkit.h +++ b/include/configs/bf548-ezkit.h @@ -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 */ /* diff --git a/include/configs/bf561-acvilon.h b/include/configs/bf561-acvilon.h index 6871d8c..03f3cec 100644 --- a/include/configs/bf561-acvilon.h +++ b/include/configs/bf561-acvilon.h @@ -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 diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h index fb6f948..efbc6c2 100644 --- a/include/configs/bf561-ezkit.h +++ b/include/configs/bf561-ezkit.h @@ -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 */ /* diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h index 7de4253..28bc653 100644 --- a/include/configs/blackstamp.h +++ b/include/configs/blackstamp.h @@ -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 diff --git a/include/configs/blackvme.h b/include/configs/blackvme.h index 6e5774c..27dccf6 100644 --- a/include/configs/blackvme.h +++ b/include/configs/blackvme.h @@ -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 diff --git a/include/configs/br4.h b/include/configs/br4.h index 48cf184..a44c18c 100644 --- a/include/configs/br4.h +++ b/include/configs/br4.h @@ -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 diff --git a/include/configs/cm-bf527.h b/include/configs/cm-bf527.h index 643c837..387f1cb 100644 --- a/include/configs/cm-bf527.h +++ b/include/configs/cm-bf527.h @@ -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 /* diff --git a/include/configs/cm-bf533.h b/include/configs/cm-bf533.h index 485f01a..a464785 100644 --- a/include/configs/cm-bf533.h +++ b/include/configs/cm-bf533.h @@ -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 */ /* diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h index e059568..95afd51 100644 --- a/include/configs/cm-bf537e.h +++ b/include/configs/cm-bf537e.h @@ -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 /* diff --git a/include/configs/cm-bf537u.h b/include/configs/cm-bf537u.h index 1f26457..4df4a05 100644 --- a/include/configs/cm-bf537u.h +++ b/include/configs/cm-bf537u.h @@ -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 /* diff --git a/include/configs/cm-bf548.h b/include/configs/cm-bf548.h index 72eafc5..cde23ad 100644 --- a/include/configs/cm-bf548.h +++ b/include/configs/cm-bf548.h @@ -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 */ /* diff --git a/include/configs/cm-bf561.h b/include/configs/cm-bf561.h index 96910a7..9d8a2c6 100644 --- a/include/configs/cm-bf561.h +++ b/include/configs/cm-bf561.h @@ -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 */ /* diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h index 38fcc40..11dd4d7 100644 --- a/include/configs/cobra5272.h +++ b/include/configs/cobra5272.h @@ -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 */ diff --git a/include/configs/dbau1x00.h b/include/configs/dbau1x00.h index 56317ef..70aa699 100644 --- a/include/configs/dbau1x00.h +++ b/include/configs/dbau1x00.h @@ -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 diff --git a/include/configs/ea20.h b/include/configs/ea20.h index ae89368..fc02b30 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -242,7 +242,6 @@ "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 " \ @@ -315,6 +314,6 @@ "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 */ diff --git a/include/configs/gr_cpci_ax2000.h b/include/configs/gr_cpci_ax2000.h index 854807d..5d28d8b 100644 --- a/include/configs/gr_cpci_ax2000.h +++ b/include/configs/gr_cpci_ax2000.h @@ -280,7 +280,6 @@ /*#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 /* diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h index ed2dd2a..7c320ee 100644 --- a/include/configs/gr_ep2s60.h +++ b/include/configs/gr_ep2s60.h @@ -260,16 +260,6 @@ /* 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 /* diff --git a/include/configs/gr_xc3s_1500.h b/include/configs/gr_xc3s_1500.h index e3cbb6f..fdd0aa5 100644 --- a/include/configs/gr_xc3s_1500.h +++ b/include/configs/gr_xc3s_1500.h @@ -220,15 +220,6 @@ */ #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 /* diff --git a/include/configs/grsim.h b/include/configs/grsim.h index 1e089a9..21b4f5e 100644 --- a/include/configs/grsim.h +++ b/include/configs/grsim.h @@ -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 @@ -243,16 +242,6 @@ */ #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 */ diff --git a/include/configs/grsim_leon2.h b/include/configs/grsim_leon2.h index 66194a8..f050754 100644 --- a/include/configs/grsim_leon2.h +++ b/include/configs/grsim_leon2.h @@ -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 @@ -241,16 +240,6 @@ */ /*#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 */ diff --git a/include/configs/ibf-dsp561.h b/include/configs/ibf-dsp561.h index 2a937c6..4757929 100644 --- a/include/configs/ibf-dsp561.h +++ b/include/configs/ibf-dsp561.h @@ -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 */ /* diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h index f321975..9258734 100644 --- a/include/configs/inka4x0.h +++ b/include/configs/inka4x0.h @@ -110,9 +110,6 @@ #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 diff --git a/include/configs/ip04.h b/include/configs/ip04.h index 2ee215f..2bd81fc 100644 --- a/include/configs/ip04.h +++ b/include/configs/ip04.h @@ -131,7 +131,6 @@ * 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 diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index c354c29..490f84e 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -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 diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 166ab4f..b84eead 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -350,7 +350,6 @@ #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 */ diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h index e8b0593..4d648c8 100644 --- a/include/configs/motionpro.h +++ b/include/configs/motionpro.h @@ -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 */ /* diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h index 3030054..2082679 100644 --- a/include/configs/omap3_cairo.h +++ b/include/configs/omap3_cairo.h @@ -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" \ diff --git a/include/configs/pb1x00.h b/include/configs/pb1x00.h index a1926bb..2508702 100644 --- a/include/configs/pb1x00.h +++ b/include/configs/pb1x00.h @@ -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 diff --git a/include/configs/pr1.h b/include/configs/pr1.h index 13fb675..b9253b9 100644 --- a/include/configs/pr1.h +++ b/include/configs/pr1.h @@ -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 */ /* diff --git a/include/configs/sbc405.h b/include/configs/sbc405.h index 69dc210..11bf504 100644 --- a/include/configs/sbc405.h +++ b/include/configs/sbc405.h @@ -102,7 +102,6 @@ #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 diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h index aee0d9e..5b373cb 100644 --- a/include/configs/sbc8548.h +++ b/include/configs/sbc8548.h @@ -581,13 +581,9 @@ /* * 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 diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h index 8eb7276..021da50 100644 --- a/include/configs/sbc8641d.h +++ b/include/configs/sbc8641d.h @@ -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 @@ -528,14 +528,6 @@ * 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 diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h index f4a40bb..6cac99e 100644 --- a/include/configs/scb9328.h +++ b/include/configs/scb9328.h @@ -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 diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h index b6a5e6a..623be7d 100644 --- a/include/configs/sequoia.h +++ b/include/configs/sequoia.h @@ -100,15 +100,6 @@ #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 diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h index 5fb40eb..a0817a0 100644 --- a/include/configs/stxgp3.h +++ b/include/configs/stxgp3.h @@ -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 @@ -342,14 +342,10 @@ #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 diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h index 914d821..78ac080 100644 --- a/include/configs/stxssa.h +++ b/include/configs/stxssa.h @@ -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 @@ -377,14 +377,10 @@ #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 /* diff --git a/include/configs/tcm-bf518.h b/include/configs/tcm-bf518.h index e96a742..e726b29 100644 --- a/include/configs/tcm-bf518.h +++ b/include/configs/tcm-bf518.h @@ -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 /* @@ -111,7 +109,6 @@ * 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" diff --git a/include/configs/tcm-bf537.h b/include/configs/tcm-bf537.h index 42129fb..3326580 100644 --- a/include/configs/tcm-bf537.h +++ b/include/configs/tcm-bf537.h @@ -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 /* diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index d4688c5..331df62 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -209,7 +209,6 @@ /* * 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 diff --git a/include/configs/v38b.h b/include/configs/v38b.h index 7f6b0c7..688d60e 100644 --- a/include/configs/v38b.h +++ b/include/configs/v38b.h @@ -148,7 +148,6 @@ "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" \ "" diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h index dc8e99f..4725fc3 100644 --- a/include/configs/work_92105.h +++ b/include/configs/work_92105.h @@ -177,17 +177,6 @@ #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 */ #include <config_cmd_default.h> diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h index 2999d1b..fcb76a2 100644 --- a/include/configs/xaeniax.h +++ b/include/configs/xaeniax.h @@ -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 diff --git a/include/configs/zeus.h b/include/configs/zeus.h index 4d7a7fc..9ac4a0f 100644 --- a/include/configs/zeus.h +++ b/include/configs/zeus.h @@ -296,8 +296,6 @@ #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 diff --git a/include/env_default.h b/include/env_default.h index 90431be..3096576 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -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 diff --git a/net/Kconfig b/net/Kconfig index 22b9eaa..a2bd4fe 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -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 @@ -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); |