summaryrefslogtreecommitdiff
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/blackfin/include/asm/net.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/arch/blackfin/include/asm/net.h b/arch/blackfin/include/asm/net.h
deleted file mode 100644
index 97cb466..0000000
--- a/arch/blackfin/include/asm/net.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * net.h - misc Blackfin network helpers
- *
- * Copyright (c) 2008-2009 Analog Devices Inc.
- *
- * Licensed under the GPL-2 or later.
- */
-
-#ifndef __ASM_BFIN_RAND_MAC__
-#define __ASM_BFIN_RAND_MAC__
-
-/* If the board does not have a real MAC assigned to it, then generate a
- * locally administrated pseudo-random one based on CYCLES and compile date.
- */
-static inline void bfin_gen_rand_mac(uchar *mac_addr)
-{
- /* make something up */
- const char s[] = __DATE__;
- size_t i;
- u32 cycles;
- for (i = 0; i < 6; ++i) {
- asm("%0 = CYCLES;" : "=r" (cycles));
- mac_addr[i] = cycles ^ s[i];
- }
- mac_addr[0] = (mac_addr[0] | 0x02) & ~0x01; /* make it local unicast */
-}
-
-#endif