qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 11/11] Goldfish: Added device setup for NICs.


From: Patrick Jackson
Subject: [Qemu-devel] [PATCH 11/11] Goldfish: Added device setup for NICs.
Date: Mon, 22 Aug 2011 05:39:33 -0400


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

diff --git a/hw/android_arm.c b/hw/android_arm.c
index 5d8372d..f85db5c 100644
--- a/hw/android_arm.c
+++ b/hw/android_arm.c
@@ -74,6 +74,25 @@ static void android_arm_init_(ram_addr_t ram_size,
         }
     }
 
+    for(i = 0; i < MAX_NICS; i++) {
+        if (nd_table[i].vlan) {
+            if (nd_table[i].model == NULL
+                || strcmp(nd_table[i].model, "smc91c111") == 0) {
+                GoldfishDevice *smc_device;
+                smc_device = qemu_mallocz(sizeof(*smc_device));
+                smc_device->name = (char *)"smc91x";
+                smc_device->id = i;
+                smc_device->size = 0x1000;
+                smc_device->irq_count = 1;
+                goldfish_add_device_no_io(smc_device);
+                smc91c111_init(&nd_table[i], smc_device->base, qdev_get_gpio_in(gf_int, smc_device->irq));
+            } else {
+                fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
+                exit (1);
+            }
+        }
+    }
+
     goldfish_fb_create(gbus, 0);
     goldfish_memlog_create(gbus, 0xff006000);
     goldfish_battery_create(gbus);
-- 
1.7.4.1


reply via email to

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