ARM: DRA7: Add support for virtual mode configuration
[oweals/u-boot.git] / board / cm-bf527 / cm-bf527.c
index b6815b1ccda687fa6d224bb84724284e4c3e7cf2..3186c6717effa985158e3c578d62c1d4f4578b42 100644 (file)
@@ -11,9 +11,8 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/blackfin.h>
-#include <asm/net.h>
 #include <asm/mach-common/bits/otp.h>
-#include "gpio_cfi_flash.h"
+#include "../cm-bf537e/gpio_cfi_flash.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -27,8 +26,6 @@ int checkboard(void)
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-       bool valid_mac = false;
-
        /* the MAC is stored in OTP memory page 0xDF */
        uint32_t ret;
        uint64_t otp_mac;
@@ -40,16 +37,9 @@ static void board_init_enetaddr(uchar *mac_addr)
                for (ret = 0; ret < 6; ++ret)
                        mac_addr[ret] = otp_mac_p[5 - ret];
 
-               if (is_valid_ether_addr(mac_addr))
-                       valid_mac = true;
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               bfin_gen_rand_mac(mac_addr);
+               if (is_valid_ethaddr(mac_addr))
+                       eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
 }
 
 int board_eth_init(bd_t *bis)