qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK boa


From: Evgeny Voevodin
Subject: [Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK board.
Date: Wed, 07 Dec 2011 13:47:01 +0400

Signed-off-by: Evgeny Voevodin <address@hidden>
---
 hw/s5pc210.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/hw/s5pc210.c b/hw/s5pc210.c
index 90858e9..8678b97 100644
--- a/hw/s5pc210.c
+++ b/hw/s5pc210.c
@@ -29,6 +29,8 @@
 #include "sysemu.h"
 #include "sysbus.h"
 #include "arm-misc.h"
+#include "net.h"
+#include "devices.h"
 #include "exec-memory.h"
 #include "s5pc210.h"
 
@@ -229,6 +231,8 @@ static void s5pc210_init(ram_addr_t ram_size,
     SysBusDevice *busdev;
     ram_addr_t mem_size;
     int n;
+    NICInfo *nd;
+    int done_nic = 0;
 
     switch (board_type) {
     case BOARD_S5PC210_NURI:
@@ -446,6 +450,21 @@ static void s5pc210_init(ram_addr_t ram_size,
         s5pc210_uart_create(addr, fifo_size, channel, NULL, uart_irq);
     }
 
+    /*** LAN adapter ***/
+    if (board_type == BOARD_S5PC210_SMDKC210) {
+
+        for (n = 0; n < nb_nics; n++) {
+            nd = &nd_table[n];
+
+            if (!done_nic && (!nd->model ||
+                    strcmp(nd->model, "lan9118") == 0)) {
+                lan9118_init(nd, 0x05000000,
+                        qemu_irq_invert(irq_table[s5pc210_get_irq(37, 1)]));
+                done_nic = 1;
+            }
+        }
+    }
+
     /*** Load kernel ***/
 
     s5pc210_binfo.ram_size = ram_size;
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]