Patchwork [U-Boot,RFC,08/10] MIPS: qemu-malta: bring up ethernet

login
register
mail settings
Submitter Gabor Juhos
Date Jan. 19, 2013, 3:19 p.m.
Message ID <1358608777-7270-9-git-send-email-juhosg@openwrt.org>
Download mbox | patch
Permalink /patch/213872/
State Superseded
Delegated to: Daniel Schwierzeck
Headers show

Comments

Gabor Juhos - Jan. 19, 2013, 3:19 p.m.
Qemu emulates a PCNET PCI card for the Malta CoreLV board.
Enable the pcnet driver and add board specific ethernet
initialization function to bring it up. Also enable the
CONFIG_CMD_NET and CONFIG_CMD_PING options.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
 board/qemu-malta/qemu-malta.c |    6 ++++++
 include/configs/qemu-malta.h  |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

Patch

diff --git a/board/qemu-malta/qemu-malta.c b/board/qemu-malta/qemu-malta.c
index 9333242..10b624d 100644
--- a/board/qemu-malta/qemu-malta.c
+++ b/board/qemu-malta/qemu-malta.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <netdev.h>
 
 #include <asm/io.h>
 #include <asm/malta.h>
@@ -22,6 +23,11 @@  int checkboard(void)
 	return 0;
 }
 
+int board_eth_init(bd_t *bis)
+{
+	return pci_eth_init(bis);
+}
+
 void _machine_restart(void)
 {
 	void __iomem *reset_base;
diff --git a/include/configs/qemu-malta.h b/include/configs/qemu-malta.h
index 36b584a..3e37224 100644
--- a/include/configs/qemu-malta.h
+++ b/include/configs/qemu-malta.h
@@ -19,6 +19,7 @@ 
 
 #define CONFIG_PCI
 #define CONFIG_PCI_PNP
+#define CONFIG_PCNET
 
 /*
  * CPU Configuration
@@ -33,7 +34,6 @@ 
 
 #define CONFIG_SWAP_IO_SPACE
 
-
 /*
  * Memory map
  */
@@ -109,10 +109,10 @@ 
 #undef CONFIG_CMD_FPGA
 #undef CONFIG_CMD_LOADB
 #undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_NET
 #undef CONFIG_CMD_NFS
 
 #define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
 
 #define CONFIG_SYS_LONGHELP		/* verbose help, undef to save memory */