Skip to content
Snippets Groups Projects
Commit d69f8f41 authored by Michal Simek's avatar Michal Simek
Browse files

microblaze: Add support for NET_MULTI api


Microblaze hasn't supported NET_MULTI support.

Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 4aecfb16
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <version.h> #include <version.h>
#include <watchdog.h> #include <watchdog.h>
#include <stdio_dev.h> #include <stdio_dev.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -42,6 +43,7 @@ extern int gpio_init (void); ...@@ -42,6 +43,7 @@ extern int gpio_init (void);
#ifdef CONFIG_SYS_INTC_0 #ifdef CONFIG_SYS_INTC_0
extern int interrupts_init (void); extern int interrupts_init (void);
#endif #endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
extern int eth_init (bd_t * bis); extern int eth_init (bd_t * bis);
#endif #endif
...@@ -165,8 +167,14 @@ void board_init (void) ...@@ -165,8 +167,14 @@ void board_init (void)
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
/* IP Address */ /* IP Address */
bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); bd->bi_ip_addr = getenv_IPaddr("ipaddr");
eth_init (bd);
printf("Net: ");
eth_initialize(gd->bd);
uchar enetaddr[6];
eth_getenv_enetaddr("ethaddr", enetaddr);
printf("MAC: %pM\n", enetaddr);
#endif #endif
/* main_loop */ /* main_loop */
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <common.h> #include <common.h>
#include <config.h> #include <config.h>
#include <netdev.h>
#include <asm/microblaze_intc.h> #include <asm/microblaze_intc.h>
#include <asm/asm.h> #include <asm/asm.h>
...@@ -66,3 +67,15 @@ int fsl_init2 (void) { ...@@ -66,3 +67,15 @@ int fsl_init2 (void) {
return 0; return 0;
} }
#endif #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
}
...@@ -243,9 +243,11 @@ ...@@ -243,9 +243,11 @@
#ifndef CONFIG_SYS_ENET #ifndef CONFIG_SYS_ENET
# undef CONFIG_CMD_NET # undef CONFIG_CMD_NET
# undef CONFIG_NET_MULTI
#else #else
# define CONFIG_CMD_PING # define CONFIG_CMD_PING
# define CONFIG_CMD_DHCP # define CONFIG_CMD_DHCP
# define CONFIG_NET_MULTI
#endif #endif
#if defined(CONFIG_SYSTEMACE) #if defined(CONFIG_SYSTEMACE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment