Remove arch/${ARCH}/include/asm/errno.h
[oweals/u-boot.git] / board / cm-bf537u / cm-bf537u.c
index 92fa5a099375fa42151551662d123bbaf4db31f7..aad72a9783232a35500d66753b86bcf370497033 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * U-boot - main board file
+ * U-Boot - main board file
  *
  * Copyright (c) 2005-2009 Analog Devices Inc.
  *
@@ -12,8 +12,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/blackfin.h>
-#include <asm/net.h>
-#include "gpio_cfi_flash.h"
+#include "../cm-bf537e/gpio_cfi_flash.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -24,35 +23,21 @@ int checkboard(void)
        return 0;
 }
 
-#ifdef CONFIG_BFIN_MAC
-static void board_init_enetaddr(uchar *mac_addr)
-{
-       puts("Warning: Generating 'random' MAC address\n");
-       bfin_gen_rand_mac(mac_addr);
-       eth_setenv_enetaddr("ethaddr", mac_addr);
-}
-
-int board_eth_init(bd_t *bis)
-{
-       return bfin_EMAC_initialize(bis);
-}
+#ifndef CONFIG_BFIN_MAC
+# define bfin_EMAC_initialize(x) 1
+#endif
+#ifndef CONFIG_SMC911X
+# define smc911x_initialize(n, x) 1
 #endif
-
-#ifdef CONFIG_SMC911X
 int board_eth_init(bd_t *bis)
 {
-       return smc911x_initialize(0, CONFIG_SMC911X_BASE);
+       /* return ok if at least 1 eth device works */
+       return bfin_EMAC_initialize(bis) &
+              smc911x_initialize(0, CONFIG_SMC911X_BASE);
 }
-#endif
 
 int misc_init_r(void)
 {
-#ifdef CONFIG_BFIN_MAC
-       uchar enetaddr[6];
-       if (!eth_getenv_enetaddr("ethaddr", enetaddr))
-               board_init_enetaddr(enetaddr);
-#endif
-
        gpio_cfi_flash_init();
 
        return 0;