summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-04-18 19:09:49 +0900
committerTom Rini <trini@ti.com>2014-05-12 15:19:46 -0400
commitc42f56d96d1ec642496ee0fdf741dc13fbbec2e2 (patch)
treeb1aaa48fc2356b36d981d2732b0b25400a5a30e9 /board
parentda384a9d7628c77140023e7c095f79ecfe5a4e2d (diff)
downloadu-boot-imx-c42f56d96d1ec642496ee0fdf741dc13fbbec2e2.zip
u-boot-imx-c42f56d96d1ec642496ee0fdf741dc13fbbec2e2.tar.gz
u-boot-imx-c42f56d96d1ec642496ee0fdf741dc13fbbec2e2.tar.bz2
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.c3
-rw-r--r--board/bf518f-ezbrd/bf518f-ezbrd.c3
-rw-r--r--board/bf526-ezbrd/bf526-ezbrd.c3
-rw-r--r--board/bf527-ezkit/bf527-ezkit.c3
-rw-r--r--board/bf537-minotaur/bf537-minotaur.c3
-rw-r--r--board/bf537-pnav/bf537-pnav.c3
-rw-r--r--board/bf537-srv1/bf537-srv1.c3
-rw-r--r--board/bf537-stamp/bf537-stamp.c3
-rw-r--r--board/cm-bf527/cm-bf527.c3
-rw-r--r--board/cm-bf537e/cm-bf537e.c3
-rw-r--r--board/cm-bf537u/cm-bf537u.c3
-rw-r--r--board/dnp5370/dnp5370.c3
-rw-r--r--board/ip04/ip04.c3
-rw-r--r--board/tcm-bf518/tcm-bf518.c3
-rw-r--r--board/tcm-bf537/tcm-bf537.c3
15 files changed, 15 insertions, 30 deletions
diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c
index de5b9ff..6be9b18 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 09a2353..3a94a57 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 4695b11..368d6be 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 211cf24..88e1869 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 920429c..ca61ef9 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 c512528..df00110 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 04d3891..725296a 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 5fdf837..32045a9 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 a5f70a4..1533eb9 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 8daf3ad..e79f90f 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 5941b5f..632cbda 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 4b3873b..df721c9 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 c8ae512..ae52633 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 5964059..5d25fcd 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 38aaae6..a4f0f71 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);
}