Commit 76ec988b062ed880ab23d0e0d4e9e6c137b55cc3

Authored by Joe Hershberger
1 parent 92ac520821

net: Remove all calls to net_random_ethaddr()

Remove the calls to net_random_ethaddr() that some boards and some
drivers are calling. This is now implemented inside of net/eth.c

Enable the feature for all boards that previously enabled it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-By: Michael Walle <michael@walle.cc> (for the lsxl board part)

Series-changes: 2
-Fixed bfin build errors

Showing 41 changed files with 64 additions and 294 deletions Side-by-side Diff

board/bct-brettl2/bct-brettl2.c
... ... @@ -29,13 +29,6 @@
29 29 }
30 30  
31 31 #ifdef CONFIG_BFIN_MAC
32   -static void board_init_enetaddr(uchar *mac_addr)
33   -{
34   - puts("Warning: Generating 'random' MAC address\n");
35   - net_random_ethaddr(mac_addr);
36   - eth_setenv_enetaddr("ethaddr", mac_addr);
37   -}
38   -
39 32 int board_eth_init(bd_t *bis)
40 33 {
41 34 int retry = 3;
... ... @@ -107,12 +100,6 @@
107 100 /* miscellaneous platform dependent initialisations */
108 101 int misc_init_r(void)
109 102 {
110   -#ifdef CONFIG_BFIN_MAC
111   - uchar enetaddr[6];
112   - if (!eth_getenv_enetaddr("ethaddr", enetaddr))
113   - board_init_enetaddr(enetaddr);
114   -#endif
115   -
116 103 gpio_cfi_flash_init();
117 104 init_tlv320aic31();
118 105 init_mute_pin();
board/bf518f-ezbrd/bf518f-ezbrd.c
... ... @@ -29,28 +29,14 @@
29 29 #if defined(CONFIG_BFIN_MAC)
30 30 static void board_init_enetaddr(uchar *mac_addr)
31 31 {
32   -#ifdef CONFIG_SYS_NO_FLASH
33   -# define USE_MAC_IN_FLASH 0
34   -#else
35   -# define USE_MAC_IN_FLASH 1
36   -#endif
37   - bool valid_mac = false;
38   -
39   - if (USE_MAC_IN_FLASH) {
40   - /* we cram the MAC in the last flash sector */
41   - uchar *board_mac_addr = (uchar *)0x203F0096;
42   - if (is_valid_ethaddr(board_mac_addr)) {
43   - memcpy(mac_addr, board_mac_addr, 6);
44   - valid_mac = true;
45   - }
  32 +#ifndef CONFIG_SYS_NO_FLASH
  33 + /* we cram the MAC in the last flash sector */
  34 + uchar *board_mac_addr = (uchar *)0x203F0096;
  35 + if (is_valid_ethaddr(board_mac_addr)) {
  36 + memcpy(mac_addr, board_mac_addr, 6);
  37 + eth_setenv_enetaddr("ethaddr", mac_addr);
46 38 }
47   -
48   - if (!valid_mac) {
49   - puts("Warning: Generating 'random' MAC address\n");
50   - net_random_ethaddr(mac_addr);
51   - }
52   -
53   - eth_setenv_enetaddr("ethaddr", mac_addr);
  39 +#endif
54 40 }
55 41  
56 42 /* Only the first run of boards had a KSZ switch */
board/bf526-ezbrd/bf526-ezbrd.c
... ... @@ -26,28 +26,14 @@
26 26 #ifdef CONFIG_BFIN_MAC
27 27 static void board_init_enetaddr(uchar *mac_addr)
28 28 {
29   -#ifdef CONFIG_SYS_NO_FLASH
30   -# define USE_MAC_IN_FLASH 0
31   -#else
32   -# define USE_MAC_IN_FLASH 1
33   -#endif
34   - bool valid_mac = false;
35   -
36   - if (USE_MAC_IN_FLASH) {
37   - /* we cram the MAC in the last flash sector */
38   - uchar *board_mac_addr = (uchar *)0x203F0096;
39   - if (is_valid_ethaddr(board_mac_addr)) {
40   - memcpy(mac_addr, board_mac_addr, 6);
41   - valid_mac = true;
42   - }
  29 +#ifndef CONFIG_SYS_NO_FLASH
  30 + /* we cram the MAC in the last flash sector */
  31 + uchar *board_mac_addr = (uchar *)0x203F0096;
  32 + if (is_valid_ethaddr(board_mac_addr)) {
  33 + memcpy(mac_addr, board_mac_addr, 6);
  34 + eth_setenv_enetaddr("ethaddr", mac_addr);
43 35 }
44   -
45   - if (!valid_mac) {
46   - puts("Warning: Generating 'random' MAC address\n");
47   - net_random_ethaddr(mac_addr);
48   - }
49   -
50   - eth_setenv_enetaddr("ethaddr", mac_addr);
  36 +#endif
51 37 }
52 38  
53 39 int board_eth_init(bd_t *bis)
board/bf527-ezkit/bf527-ezkit.c
... ... @@ -27,8 +27,6 @@
27 27 #ifdef CONFIG_BFIN_MAC
28 28 static void board_init_enetaddr(uchar *mac_addr)
29 29 {
30   - bool valid_mac = false;
31   -
32 30 /* the MAC is stored in OTP memory page 0xDF */
33 31 uint32_t ret;
34 32 uint64_t otp_mac;
35 33  
... ... @@ -41,15 +39,8 @@
41 39 mac_addr[ret] = otp_mac_p[5 - ret];
42 40  
43 41 if (is_valid_ethaddr(mac_addr))
44   - valid_mac = true;
  42 + eth_setenv_enetaddr("ethaddr", mac_addr);
45 43 }
46   -
47   - if (!valid_mac) {
48   - puts("Warning: Generating 'random' MAC address\n");
49   - net_random_ethaddr(mac_addr);
50   - }
51   -
52   - eth_setenv_enetaddr("ethaddr", mac_addr);
53 44 }
54 45  
55 46 int board_eth_init(bd_t *bis)
board/bf537-minotaur/bf537-minotaur.c
... ... @@ -23,27 +23,9 @@
23 23 }
24 24  
25 25 #ifdef CONFIG_BFIN_MAC
26   -static void board_init_enetaddr(uchar *mac_addr)
27   -{
28   - puts("Warning: Generating 'random' MAC address\n");
29   - net_random_ethaddr(mac_addr);
30   - eth_setenv_enetaddr("ethaddr", mac_addr);
31   -}
32   -
33 26 int board_eth_init(bd_t *bis)
34 27 {
35 28 return bfin_EMAC_initialize(bis);
36 29 }
37 30 #endif
38   -
39   -int misc_init_r(void)
40   -{
41   -#ifdef CONFIG_BFIN_MAC
42   - uchar enetaddr[6];
43   - if (!eth_getenv_enetaddr("ethaddr", enetaddr))
44   - board_init_enetaddr(enetaddr);
45   -#endif
46   -
47   - return 0;
48   -}
board/bf537-pnav/bf537-pnav.c
... ... @@ -23,27 +23,9 @@
23 23 }
24 24  
25 25 #ifdef CONFIG_BFIN_MAC
26   -static void board_init_enetaddr(uchar *mac_addr)
27   -{
28   - puts("Warning: Generating 'random' MAC address\n");
29   - net_random_ethaddr(mac_addr);
30   - eth_setenv_enetaddr("ethaddr", mac_addr);
31   -}
32   -
33 26 int board_eth_init(bd_t *bis)
34 27 {
35 28 return bfin_EMAC_initialize(bis);
36 29 }
37 30 #endif
38   -
39   -int misc_init_r(void)
40   -{
41   -#ifdef CONFIG_BFIN_MAC
42   - uchar enetaddr[6];
43   - if (!eth_getenv_enetaddr("ethaddr", enetaddr))
44   - board_init_enetaddr(enetaddr);
45   -#endif
46   -
47   - return 0;
48   -}
board/bf537-srv1/bf537-srv1.c
... ... @@ -23,27 +23,9 @@
23 23 }
24 24  
25 25 #ifdef CONFIG_BFIN_MAC
26   -static void board_init_enetaddr(uchar *mac_addr)
27   -{
28   - puts("Warning: Generating 'random' MAC address\n");
29   - net_random_ethaddr(mac_addr);
30   - eth_setenv_enetaddr("ethaddr", mac_addr);
31   -}
32   -
33 26 int board_eth_init(bd_t *bis)
34 27 {
35 28 return bfin_EMAC_initialize(bis);
36 29 }
37 30 #endif
38   -
39   -int misc_init_r(void)
40   -{
41   -#ifdef CONFIG_BFIN_MAC
42   - uchar enetaddr[6];
43   - if (!eth_getenv_enetaddr("ethaddr", enetaddr))
44   - board_init_enetaddr(enetaddr);
45   -#endif
46   -
47   - return 0;
48   -}
board/bf537-stamp/bf537-stamp.c
... ... @@ -29,28 +29,14 @@
29 29 #ifdef CONFIG_BFIN_MAC
30 30 static void board_init_enetaddr(uchar *mac_addr)
31 31 {
32   -#ifdef CONFIG_SYS_NO_FLASH
33   -# define USE_MAC_IN_FLASH 0
34   -#else
35   -# define USE_MAC_IN_FLASH 1
36   -#endif
37   - bool valid_mac = false;
38   -
39   - if (USE_MAC_IN_FLASH) {
40   - /* we cram the MAC in the last flash sector */
41   - uchar *board_mac_addr = (uchar *)0x203F0000;
42   - if (is_valid_ethaddr(board_mac_addr)) {
43   - memcpy(mac_addr, board_mac_addr, 6);
44   - valid_mac = true;
45   - }
  32 +#ifndef CONFIG_SYS_NO_FLASH
  33 + /* we cram the MAC in the last flash sector */
  34 + uchar *board_mac_addr = (uchar *)0x203F0000;
  35 + if (is_valid_ethaddr(board_mac_addr)) {
  36 + memcpy(mac_addr, board_mac_addr, 6);
  37 + eth_setenv_enetaddr("ethaddr", mac_addr);
46 38 }
47   -
48   - if (!valid_mac) {
49   - puts("Warning: Generating 'random' MAC address\n");
50   - net_random_ethaddr(mac_addr);
51   - }
52   -
53   - eth_setenv_enetaddr("ethaddr", mac_addr);
  39 +#endif
54 40 }
55 41  
56 42 int board_eth_init(bd_t *bis)
board/buffalo/lsxl/lsxl.c
... ... @@ -230,16 +230,6 @@
230 230 uchar enetaddr[6];
231 231  
232 232 printf("Entering rescue mode..\n");
233   -#ifdef CONFIG_RANDOM_MACADDR
234   - if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
235   - net_random_ethaddr(enetaddr);
236   - if (eth_setenv_enetaddr("ethaddr", enetaddr)) {
237   - printf("Failed to set ethernet address\n");
238   - set_led(LED_ALARM_BLINKING);
239   - return;
240   - }
241   - }
242   -#endif
243 233 setenv("bootsource", "rescue");
244 234 }
245 235  
board/cm-bf527/cm-bf527.c
... ... @@ -26,8 +26,6 @@
26 26 #ifdef CONFIG_BFIN_MAC
27 27 static void board_init_enetaddr(uchar *mac_addr)
28 28 {
29   - bool valid_mac = false;
30   -
31 29 /* the MAC is stored in OTP memory page 0xDF */
32 30 uint32_t ret;
33 31 uint64_t otp_mac;
34 32  
... ... @@ -40,15 +38,8 @@
40 38 mac_addr[ret] = otp_mac_p[5 - ret];
41 39  
42 40 if (is_valid_ethaddr(mac_addr))
43   - valid_mac = true;
  41 + eth_setenv_enetaddr("ethaddr", mac_addr);
44 42 }
45   -
46   - if (!valid_mac) {
47   - puts("Warning: Generating 'random' MAC address\n");
48   - net_random_ethaddr(mac_addr);
49   - }
50   -
51   - eth_setenv_enetaddr("ethaddr", mac_addr);
52 43 }
53 44  
54 45 int board_eth_init(bd_t *bis)
board/cm-bf537e/cm-bf537e.c
... ... @@ -23,18 +23,6 @@
23 23 return 0;
24 24 }
25 25  
26   -static void board_init_enetaddr(char *var)
27   -{
28   - uchar enetaddr[6];
29   -
30   - if (eth_getenv_enetaddr(var, enetaddr))
31   - return;
32   -
33   - printf("Warning: %s: generating 'random' MAC address\n", var);
34   - net_random_ethaddr(enetaddr);
35   - eth_setenv_enetaddr(var, enetaddr);
36   -}
37   -
38 26 #ifndef CONFIG_BFIN_MAC
39 27 # define bfin_EMAC_initialize(x) 1
40 28 #endif
... ... @@ -50,9 +38,6 @@
50 38  
51 39 int misc_init_r(void)
52 40 {
53   - board_init_enetaddr("ethaddr");
54   - board_init_enetaddr("eth1addr");
55   -
56 41 gpio_cfi_flash_init();
57 42  
58 43 return 0;
board/cm-bf537u/cm-bf537u.c
... ... @@ -23,18 +23,6 @@
23 23 return 0;
24 24 }
25 25  
26   -static void board_init_enetaddr(char *var)
27   -{
28   - uchar enetaddr[6];
29   -
30   - if (eth_getenv_enetaddr(var, enetaddr))
31   - return;
32   -
33   - printf("Warning: %s: generating 'random' MAC address\n", var);
34   - net_random_ethaddr(enetaddr);
35   - eth_setenv_enetaddr(var, enetaddr);
36   -}
37   -
38 26 #ifndef CONFIG_BFIN_MAC
39 27 # define bfin_EMAC_initialize(x) 1
40 28 #endif
... ... @@ -50,9 +38,6 @@
50 38  
51 39 int misc_init_r(void)
52 40 {
53   - board_init_enetaddr("ethaddr");
54   - board_init_enetaddr("eth1addr");
55   -
56 41 gpio_cfi_flash_init();
57 42  
58 43 return 0;
board/dnp5370/dnp5370.c
... ... @@ -36,28 +36,14 @@
36 36 #ifdef CONFIG_BFIN_MAC
37 37 static void board_init_enetaddr(uchar *mac_addr)
38 38 {
39   -#ifdef CONFIG_SYS_NO_FLASH
40   -# define USE_MAC_IN_FLASH 0
41   -#else
42   -# define USE_MAC_IN_FLASH 1
43   -#endif
44   - bool valid_mac = false;
45   -
46   - if (USE_MAC_IN_FLASH) {
47   - /* we cram the MAC in the last flash sector */
48   - uchar *board_mac_addr = (uchar *)0x202F0000;
49   - if (is_valid_ethaddr(board_mac_addr)) {
50   - memcpy(mac_addr, board_mac_addr, 6);
51   - valid_mac = true;
52   - }
  39 +#ifndef CONFIG_SYS_NO_FLASH
  40 + /* we cram the MAC in the last flash sector */
  41 + uchar *board_mac_addr = (uchar *)0x202F0000;
  42 + if (is_valid_ethaddr(board_mac_addr)) {
  43 + memcpy(mac_addr, board_mac_addr, 6);
  44 + eth_setenv_enetaddr("ethaddr", mac_addr);
53 45 }
54   -
55   - if (!valid_mac) {
56   - puts("Warning: Generating 'random' MAC address\n");
57   - net_random_ethaddr(mac_addr);
58   - }
59   -
60   - eth_setenv_enetaddr("ethaddr", mac_addr);
  46 +#endif
61 47 }
62 48  
63 49 int board_eth_init(bd_t *bis)
... ... @@ -26,17 +26,5 @@
26 26 {
27 27 return dm9000_initialize(bis);
28 28 }
29   -
30   -int misc_init_r(void)
31   -{
32   - uchar enetaddr[6];
33   - if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
34   - puts("Warning: Generating 'random' MAC address\n");
35   - net_random_ethaddr(enetaddr);
36   - eth_setenv_enetaddr("ethaddr", enetaddr);
37   - }
38   -
39   - return 0;
40   -}
41 29 #endif
board/tcm-bf518/tcm-bf518.c
... ... @@ -23,51 +23,11 @@
23 23 }
24 24  
25 25 #if defined(CONFIG_BFIN_MAC)
26   -static void board_init_enetaddr(uchar *mac_addr)
27   -{
28   - bool valid_mac = false;
29   -
30   -#if 0
31   - /* the MAC is stored in OTP memory page 0xDF */
32   - uint32_t ret;
33   - uint64_t otp_mac;
34   -
35   - ret = bfrom_OtpRead(0xDF, OTP_LOWER_HALF, &otp_mac);
36   - if (!(ret & OTP_MASTER_ERROR)) {
37   - uchar *otp_mac_p = (uchar *)&otp_mac;
38   -
39   - for (ret = 0; ret < 6; ++ret)
40   - mac_addr[ret] = otp_mac_p[5 - ret];
41   -
42   - if (is_valid_ethaddr(mac_addr))
43   - valid_mac = true;
44   - }
45   -#endif
46   -
47   - if (!valid_mac) {
48   - puts("Warning: Generating 'random' MAC address\n");
49   - net_random_ethaddr(mac_addr);
50   - }
51   -
52   - eth_setenv_enetaddr("ethaddr", mac_addr);
53   -}
54   -
55 26 int board_eth_init(bd_t *bis)
56 27 {
57 28 return bfin_EMAC_initialize(bis);
58 29 }
59 30 #endif
60   -
61   -int misc_init_r(void)
62   -{
63   -#ifdef CONFIG_BFIN_MAC
64   - uchar enetaddr[6];
65   - if (!eth_getenv_enetaddr("ethaddr", enetaddr))
66   - board_init_enetaddr(enetaddr);
67   -#endif
68   -
69   - return 0;
70   -}
71 31  
72 32 #ifdef CONFIG_BFIN_SDH
73 33 int board_mmc_init(bd_t *bis)
board/tcm-bf537/tcm-bf537.c
... ... @@ -23,18 +23,6 @@
23 23 return 0;
24 24 }
25 25  
26   -static void board_init_enetaddr(char *var)
27   -{
28   - uchar enetaddr[6];
29   -
30   - if (eth_getenv_enetaddr(var, enetaddr))
31   - return;
32   -
33   - printf("Warning: %s: generating 'random' MAC address\n", var);
34   - net_random_ethaddr(enetaddr);
35   - eth_setenv_enetaddr(var, enetaddr);
36   -}
37   -
38 26 #ifndef CONFIG_BFIN_MAC
39 27 # define bfin_EMAC_initialize(x) 1
40 28 #endif
... ... @@ -50,9 +38,6 @@
50 38  
51 39 int misc_init_r(void)
52 40 {
53   - board_init_enetaddr("ethaddr");
54   - board_init_enetaddr("eth1addr");
55   -
56 41 gpio_cfi_flash_init();
57 42  
58 43 return 0;
configs/bct-brettl2_defconfig
1 1 CONFIG_BLACKFIN=y
2   -CONFIG_TARGET_BCT_BRETTL2=y
  2 +CONFIG_NET=y
  3 +CONFIG_NET_RANDOM_ETHADDR=y
3 4 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/bf518f-ezbrd_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF518F_EZBRD=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/bf526-ezbrd_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF526_EZBRD=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/bf527-ezkit_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF527_EZKIT=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/bf537-minotaur_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF537_MINOTAUR=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
configs/bf537-pnav_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF537_PNAV=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
configs/bf537-srv1_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF537_SRV1=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
configs/bf537-stamp_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_BF537_STAMP=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/cm-bf527_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_CM_BF527=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/cm-bf537e_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_CM_BF537E=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/cm-bf537u_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_CM_BF537U=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/dnp5370_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_DNP5370=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
configs/ip04_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_IP04=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/lschlv2_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_KIRKWOOD=y
3 3 CONFIG_TARGET_LSXL=y
  4 +CONFIG_NET=y
4 5 CONFIG_SYS_EXTRA_OPTIONS="LSCHLV2"
  6 +CONFIG_NET_RANDOM_ETHADDR=y
configs/lsxhl_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_KIRKWOOD=y
3 3 CONFIG_TARGET_LSXL=y
  4 +CONFIG_NET=y
4 5 CONFIG_SYS_EXTRA_OPTIONS="LSXHL"
  6 +CONFIG_NET_RANDOM_ETHADDR=y
configs/tcm-bf518_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_TCM_BF518=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/tcm-bf537_defconfig
1 1 CONFIG_BLACKFIN=y
  2 +CONFIG_NET=y
2 3 CONFIG_TARGET_TCM_BF537=y
  4 +CONFIG_NET_RANDOM_ETHADDR=y
3 5 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
drivers/net/dm9000x.c
... ... @@ -343,13 +343,7 @@
343 343  
344 344 printf("MAC: %pM\n", dev->enetaddr);
345 345 if (!is_valid_ethaddr(dev->enetaddr)) {
346   -#ifdef CONFIG_RANDOM_MACADDR
347   - printf("Bad MAC address (uninitialized EEPROM?), randomizing\n");
348   - net_random_ethaddr(dev->enetaddr);
349   - printf("MAC: %pM\n", dev->enetaddr);
350   -#else
351 346 printf("WARNING: Bad MAC address (uninitialized EEPROM?)\n");
352   -#endif
353 347 }
354 348  
355 349 /* fill device MAC address registers */
drivers/net/ftmac110.c
... ... @@ -424,9 +424,6 @@
424 424 dev->send = ftmac110_send;
425 425 dev->recv = ftmac110_recv;
426 426  
427   - if (!eth_getenv_enetaddr_by_index("eth", card_nr, dev->enetaddr))
428   - net_random_ethaddr(dev->enetaddr);
429   -
430 427 /* allocate tx descriptors (it must be 16 bytes aligned) */
431 428 chip->txd = dma_alloc_coherent(
432 429 sizeof(struct ftmac110_desc) * CFG_TXDES_NUM, &chip->txd_dma);
include/configs/bf537-minotaur.h
... ... @@ -131,7 +131,6 @@
131 131 #define CONFIG_SYS_LONGHELP 1
132 132 #define CONFIG_CMDLINE_EDITING 1
133 133 #define CONFIG_ENV_OVERWRITE 1
134   -#define CONFIG_MISC_INIT_R
135 134  
136 135 #define CONFIG_BAUDRATE 57600
137 136 #define CONFIG_UART_CONSOLE 0
include/configs/bf537-pnav.h
... ... @@ -148,7 +148,6 @@
148 148 * Misc Settings
149 149 */
150 150 #define CONFIG_BAUDRATE 115200
151   -#define CONFIG_MISC_INIT_R
152 151 #define CONFIG_RTC_BFIN
153 152 #define CONFIG_UART_CONSOLE 0
154 153  
include/configs/bf537-srv1.h
... ... @@ -130,7 +130,6 @@
130 130 #define CONFIG_SYS_LONGHELP 1
131 131 #define CONFIG_CMDLINE_EDITING 1
132 132 #define CONFIG_ENV_OVERWRITE 1
133   -#define CONFIG_MISC_INIT_R
134 133  
135 134 #define CONFIG_BAUDRATE 115200
136 135 #define CONFIG_UART_CONSOLE 0
include/configs/ip04.h
... ... @@ -131,7 +131,6 @@
131 131 * Misc Settings
132 132 */
133 133 #define CONFIG_BAUDRATE 115200
134   -#define CONFIG_MISC_INIT_R /* needed for MAC address */
135 134 #define CONFIG_UART_CONSOLE 0
136 135  
137 136 #undef CONFIG_SHOW_BOOT_PROGRESS
include/configs/lsxl.h
... ... @@ -37,7 +37,6 @@
37 37 #define CONFIG_MISC_INIT_R
38 38 #define CONFIG_SHOW_BOOT_PROGRESS
39 39  
40   -#define CONFIG_RANDOM_MACADDR
41 40 #define CONFIG_LIB_RAND
42 41 #define CONFIG_KIRKWOOD_GPIO
43 42 #define CONFIG_OF_LIBFDT
include/configs/tcm-bf518.h
... ... @@ -109,7 +109,6 @@
109 109 * Misc Settings
110 110 */
111 111 #define CONFIG_BAUDRATE 115200
112   -#define CONFIG_MISC_INIT_R
113 112 #define CONFIG_RTC_BFIN
114 113 #define CONFIG_UART_CONSOLE 0
115 114 #define CONFIG_BOOTCOMMAND "run flashboot"