]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/spear/spear310/spear310.c
SPEAr: Add macb driver support for spear310 and spear320
[people/ms/u-boot.git] / board / spear / spear310 / spear310.c
index 043a9f3aee98c0456044a6ac91329f7cc8479c7b..c0e68299944e7e2663f8add6683b836b92bde59d 100644 (file)
@@ -65,9 +65,28 @@ 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;
+       if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) < 0)
+               ret += -1;
+#endif
+#if defined(CONFIG_MACB)
+       if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE,
+                               CONFIG_MACB0_PHY) < 0)
+               ret += -1;
+
+       if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE,
+                               CONFIG_MACB1_PHY) < 0)
+               ret += -1;
+
+       if (macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE,
+                               CONFIG_MACB2_PHY) < 0)
+               ret += -1;
+
+       if (macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE,
+                               CONFIG_MACB3_PHY) < 0)
+               ret += -1;
 #endif
+       return ret;
 }