summary refs log tree commit diff stats
path: root/hw/mcf5208.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-04 00:31:01 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-04 00:31:01 +0000
commit7e049b8a19e934a8b4a8807d5d2452e0749eac6c (patch)
tree03bc2ff0aeea5490caf3be1d41d232ea902ce092 /hw/mcf5208.c
parentd0bdf2a28b7a73f02fd8025ab885c50c84def702 (diff)
downloadfocaccia-qemu-7e049b8a19e934a8b4a8807d5d2452e0749eac6c.tar.gz
focaccia-qemu-7e049b8a19e934a8b4a8807d5d2452e0749eac6c.zip
ColdFire Ethernet support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2942 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mcf5208.c')
-rw-r--r--hw/mcf5208.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/hw/mcf5208.c b/hw/mcf5208.c
index 886688f28d..8068f7861d 100644
--- a/hw/mcf5208.c
+++ b/hw/mcf5208.c
@@ -236,10 +236,27 @@ static void mcf5208evb_init(int ram_size, int vga_ram_size, int boot_device,
 
     mcf5208_sys_init(pic);
 
+    if (nb_nics > 1) {
+        fprintf(stderr, "Too many NICs\n");
+        exit(1);
+    }
+    if (nd_table[0].vlan) {
+        if (nd_table[0].model == NULL
+            || strcmp(nd_table[0].model, "mcf_fec") == 0) {
+            mcf_fec_init(&nd_table[0], 0xfc030000, pic + 36);
+        } else if (strcmp(nd_table[0].model, "?") == 0) {
+            fprintf(stderr, "qemu: Supported NICs: mcf_fec\n");
+            exit (1);
+        } else {
+            fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
+            exit (1);
+        }
+    }
+
     /*  0xfc000000 SCM.  */
     /*  0xfc004000 XBS.  */
     /*  0xfc008000 FlexBus CS.  */
-    /*  0xfc030000 FEC.  */
+    /* 0xfc030000 FEC.  */
     /*  0xfc040000 SCM + Power management.  */
     /*  0xfc044000 eDMA.  */
     /* 0xfc048000 INTC.  */