]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/spear/spear600/spear600.c
SPEAr: Add interface information in initialization
[people/ms/u-boot.git] / board / spear / spear600 / spear600.c
index d18d313b298fc750a76c2d4229b62d19b89c27ef..814f9ccb6b2aeb71030ee305dfded1dea93a68f1 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <common.h>
+#include <miiphy.h>
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
@@ -59,9 +60,16 @@ void board_nand_init()
 
 int board_eth_init(bd_t *bis)
 {
+       int ret = 0;
+
 #if defined(CONFIG_DESIGNWARE_ETH)
-       return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY);
-#else
-       return -1;
+       u32 interface = PHY_INTERFACE_MODE_MII;
+#if defined(CONFIG_DW_AUTONEG)
+       interface = PHY_INTERFACE_MODE_GMII;
+#endif
+       if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY,
+                               interface) >= 0)
+               ret++;
 #endif
+       return ret;
 }