]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/bf537-stamp/bf537-stamp.c
gpio: am43xx: expand gpio support
[karo-tx-uboot.git] / board / bf537-stamp / bf537-stamp.c
index 5fdf8379c08f02818e5356608fd145d5c4f36340..85d41d0aaae4de44bccd7ceeaaac4f879920a5d9 100644 (file)
@@ -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>
@@ -30,28 +29,14 @@ int checkboard(void)
 #ifdef 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 *)0x203F0000;
-               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 *)0x203F0000;
+       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
 }
 
 int board_eth_init(bd_t *bis)