]> git.sur5r.net Git - u-boot/blobdiff - board/bf518f-ezbrd/bf518f-ezbrd.c
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[u-boot] / board / bf518f-ezbrd / bf518f-ezbrd.c
index 09a2353e7d93f26f730e5691507941ca62c22f93..bf4a7db03d6d2bf231d23d5c7087dc07b0c485cf 100644 (file)
@@ -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>
@@ -30,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_ether_addr(board_mac_addr)) {
-                       memcpy(mac_addr, board_mac_addr, 6);
-                       valid_mac = true;
-               }
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               bfin_gen_rand_mac(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 */