]> git.sur5r.net Git - u-boot/blobdiff - board/mpc8540eval/mpc8540eval.c
Moved initialization of TULIP Ethernet controller to board_eth_init()
[u-boot] / board / mpc8540eval / mpc8540eval.c
index 7c54458a57e676f3531b48221f573254bb99559f..028a70fad84fd96fdd8cdbb6b3bec488012dc73a 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <common.h>
+#include <netdev.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
@@ -247,3 +248,14 @@ long int fixed_sdram (void)
        return (CFG_SDRAM_SIZE * 1024 * 1024);
 }
 #endif /* !defined(CONFIG_SPD_EEPROM) */
+
+int board_eth_init(bd_t *bis)
+{
+       /*
+        * This board either has PCI NICs or uses the CPU's TSECs
+        * pci_eth_init() will return 0 if no NICs found, so in that case
+        * returning -1 will force cpu_eth_init() to be called.
+        */
+       int num = pci_eth_init(bis);
+       return (num <= 0 ? -1 : num);
+}