diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-04-18 19:09:49 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-12 15:19:46 -0400 |
commit | c42f56d96d1ec642496ee0fdf741dc13fbbec2e2 (patch) | |
tree | b1aaa48fc2356b36d981d2732b0b25400a5a30e9 /board | |
parent | da384a9d7628c77140023e7c095f79ecfe5a4e2d (diff) |
blackfin: replace bfin_gen_rand_mac() with eth_random_addr()
bfin_gen_rand_mac() uses __DATE__ as the seed for random ethernet
address. This makes the build non-deterministic.
In the first place, it should not be implemented as a Bfin-specific
function. Use eth_random_addr() instead.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/bct-brettl2/bct-brettl2.c | 3 | ||||
-rw-r--r-- | board/bf518f-ezbrd/bf518f-ezbrd.c | 3 | ||||
-rw-r--r-- | board/bf526-ezbrd/bf526-ezbrd.c | 3 | ||||
-rw-r--r-- | board/bf527-ezkit/bf527-ezkit.c | 3 | ||||
-rw-r--r-- | board/bf537-minotaur/bf537-minotaur.c | 3 | ||||
-rw-r--r-- | board/bf537-pnav/bf537-pnav.c | 3 | ||||
-rw-r--r-- | board/bf537-srv1/bf537-srv1.c | 3 | ||||
-rw-r--r-- | board/bf537-stamp/bf537-stamp.c | 3 | ||||
-rw-r--r-- | board/cm-bf527/cm-bf527.c | 3 | ||||
-rw-r--r-- | board/cm-bf537e/cm-bf537e.c | 3 | ||||
-rw-r--r-- | board/cm-bf537u/cm-bf537u.c | 3 | ||||
-rw-r--r-- | board/dnp5370/dnp5370.c | 3 | ||||
-rw-r--r-- | board/ip04/ip04.c | 3 | ||||
-rw-r--r-- | board/tcm-bf518/tcm-bf518.c | 3 | ||||
-rw-r--r-- | board/tcm-bf537/tcm-bf537.c | 3 |
15 files changed, 15 insertions, 30 deletions
diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c index de5b9ff0e75..6be9b180159 100644 --- a/board/bct-brettl2/bct-brettl2.c +++ b/board/bct-brettl2/bct-brettl2.c @@ -12,7 +12,6 @@ #include <asm/blackfin.h> #include <asm/portmux.h> #include <asm/gpio.h> -#include <asm/net.h> #include <net.h> #include <netdev.h> #include <miiphy.h> @@ -33,7 +32,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 09a2353e7d9..3a94a572eb2 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -13,7 +13,6 @@ #include <netdev.h> #include <spi.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <asm/portmux.h> #include <asm/mach-common/bits/otp.h> #include <asm/sdh.h> @@ -48,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c index 4695b1161a0..368d6be25fb 100644 --- a/board/bf526-ezbrd/bf526-ezbrd.c +++ b/board/bf526-ezbrd/bf526-ezbrd.c @@ -12,7 +12,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <asm/mach-common/bits/otp.h> DECLARE_GLOBAL_DATA_PTR; @@ -45,7 +44,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index 211cf24ac30..88e18690e03 100644 --- a/board/bf527-ezkit/bf527-ezkit.c +++ b/board/bf527-ezkit/bf527-ezkit.c @@ -13,7 +13,6 @@ #include <netdev.h> #include <asm/blackfin.h> #include <asm/gpio.h> -#include <asm/net.h> #include <asm/mach-common/bits/otp.h> DECLARE_GLOBAL_DATA_PTR; @@ -47,7 +46,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c index 920429c12e6..ca61ef97b86 100644 --- a/board/bf537-minotaur/bf537-minotaur.c +++ b/board/bf537-minotaur/bf537-minotaur.c @@ -12,7 +12,6 @@ #include <netdev.h> #include <net.h> #include <asm/blackfin.h> -#include <asm/net.h> DECLARE_GLOBAL_DATA_PTR; @@ -27,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c index c5125288cbd..df0011026a6 100644 --- a/board/bf537-pnav/bf537-pnav.c +++ b/board/bf537-pnav/bf537-pnav.c @@ -12,7 +12,6 @@ #include <netdev.h> #include <net.h> #include <asm/blackfin.h> -#include <asm/net.h> DECLARE_GLOBAL_DATA_PTR; @@ -27,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-srv1/bf537-srv1.c b/board/bf537-srv1/bf537-srv1.c index 04d38910b3f..725296a4163 100644 --- a/board/bf537-srv1/bf537-srv1.c +++ b/board/bf537-srv1/bf537-srv1.c @@ -12,7 +12,6 @@ #include <netdev.h> #include <net.h> #include <asm/blackfin.h> -#include <asm/net.h> DECLARE_GLOBAL_DATA_PTR; @@ -27,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c index 5fdf8379c08..32045a9e47c 100644 --- a/board/bf537-stamp/bf537-stamp.c +++ b/board/bf537-stamp/bf537-stamp.c @@ -13,7 +13,6 @@ #include <config.h> #include <command.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <net.h> #include <asm/mach-common/bits/bootrom.h> #include <netdev.h> @@ -48,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/cm-bf527/cm-bf527.c b/board/cm-bf527/cm-bf527.c index a5f70a4f839..1533eb9c7a8 100644 --- a/board/cm-bf527/cm-bf527.c +++ b/board/cm-bf527/cm-bf527.c @@ -11,7 +11,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <asm/mach-common/bits/otp.h> #include "../cm-bf537e/gpio_cfi_flash.h" @@ -46,7 +45,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/cm-bf537e/cm-bf537e.c b/board/cm-bf537e/cm-bf537e.c index 8daf3ad06e8..e79f90f95bc 100644 --- a/board/cm-bf537e/cm-bf537e.c +++ b/board/cm-bf537e/cm-bf537e.c @@ -12,7 +12,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include "gpio_cfi_flash.h" DECLARE_GLOBAL_DATA_PTR; @@ -32,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - bfin_gen_rand_mac(enetaddr); + eth_random_addr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } diff --git a/board/cm-bf537u/cm-bf537u.c b/board/cm-bf537u/cm-bf537u.c index 5941b5fcbe0..632cbda5c06 100644 --- a/board/cm-bf537u/cm-bf537u.c +++ b/board/cm-bf537u/cm-bf537u.c @@ -12,7 +12,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include "../cm-bf537e/gpio_cfi_flash.h" DECLARE_GLOBAL_DATA_PTR; @@ -32,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - bfin_gen_rand_mac(enetaddr); + eth_random_addr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c index 4b3873bd4f3..df721c9944a 100644 --- a/board/dnp5370/dnp5370.c +++ b/board/dnp5370/dnp5370.c @@ -14,7 +14,6 @@ #include <common.h> #include <config.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <net.h> #include <netdev.h> #include <asm/gpio.h> @@ -55,7 +54,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/ip04/ip04.c b/board/ip04/ip04.c index c8ae5128b0e..ae526334267 100644 --- a/board/ip04/ip04.c +++ b/board/ip04/ip04.c @@ -13,7 +13,6 @@ #include <common.h> #include <net.h> #include <netdev.h> -#include <asm/net.h> int checkboard(void) { @@ -33,7 +32,7 @@ int misc_init_r(void) uchar enetaddr[6]; if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(enetaddr); + eth_random_addr(enetaddr); eth_setenv_enetaddr("ethaddr", enetaddr); } diff --git a/board/tcm-bf518/tcm-bf518.c b/board/tcm-bf518/tcm-bf518.c index 5964059dd1d..5d25fcd0a91 100644 --- a/board/tcm-bf518/tcm-bf518.c +++ b/board/tcm-bf518/tcm-bf518.c @@ -11,7 +11,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include <asm/mach-common/bits/otp.h> #include <asm/sdh.h> @@ -47,7 +46,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - bfin_gen_rand_mac(mac_addr); + eth_random_addr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/tcm-bf537/tcm-bf537.c b/board/tcm-bf537/tcm-bf537.c index 38aaae6870b..a4f0f7121b1 100644 --- a/board/tcm-bf537/tcm-bf537.c +++ b/board/tcm-bf537/tcm-bf537.c @@ -12,7 +12,6 @@ #include <net.h> #include <netdev.h> #include <asm/blackfin.h> -#include <asm/net.h> #include "../cm-bf537e/gpio_cfi_flash.h" DECLARE_GLOBAL_DATA_PTR; @@ -32,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - bfin_gen_rand_mac(enetaddr); + eth_random_addr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } |