]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
microblaze: Add support for NET_MULTI api
authorMichal Simek <monstr@monstr.eu>
Mon, 2 Aug 2010 12:42:09 +0000 (14:42 +0200)
committerMichal Simek <monstr@monstr.eu>
Tue, 12 Oct 2010 06:51:34 +0000 (16:51 +1000)
Microblaze hasn't supported NET_MULTI support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/lib/board.c
board/xilinx/microblaze-generic/microblaze-generic.c
include/configs/microblaze-generic.h

index 3ff5c17d244c6e04f2db06a11e50a3a3c8d4dc41..0ce040e9efc1bebbe351189c526d31679424a36f 100644 (file)
@@ -31,6 +31,7 @@
 #include <version.h>
 #include <watchdog.h>
 #include <stdio_dev.h>
+#include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -42,6 +43,7 @@ extern int gpio_init (void);
 #ifdef CONFIG_SYS_INTC_0
 extern int interrupts_init (void);
 #endif
+
 #if defined(CONFIG_CMD_NET)
 extern int eth_init (bd_t * bis);
 #endif
@@ -165,8 +167,14 @@ void board_init (void)
 
 #if defined(CONFIG_CMD_NET)
        /* IP Address */
-       bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
-       eth_init (bd);
+       bd->bi_ip_addr = getenv_IPaddr("ipaddr");
+
+       printf("Net:   ");
+       eth_initialize(gd->bd);
+
+       uchar enetaddr[6];
+       eth_getenv_enetaddr("ethaddr", enetaddr);
+       printf("MAC:   %pM\n", enetaddr);
 #endif
 
        /* main_loop */
index 838f1315b3fd5d905997499c5bb5cabf0ac39f1f..744384c1d3a2d5efb33f21ab04c898a66ad6c584 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <netdev.h>
 #include <asm/microblaze_intc.h>
 #include <asm/asm.h>
 
@@ -66,3 +67,15 @@ int fsl_init2 (void) {
        return 0;
 }
 #endif
+
+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.
+        */
+#ifdef CONFIG_XILINX_EMACLITE
+       return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR);
+#endif
+}
index 9301a6beec068d40330e1d839d795109e894cf71..c30cc4cbc86ff48109bcf3a691bb86929d854e73 100644 (file)
 
 #ifndef CONFIG_SYS_ENET
 # undef CONFIG_CMD_NET
+# undef CONFIG_NET_MULTI
 #else
 # define CONFIG_CMD_PING
 # define CONFIG_CMD_DHCP
+# define CONFIG_NET_MULTI
 #endif
 
 #if defined(CONFIG_SYSTEMACE)