petalogix_ml605_mmu: Attach ethernet to machine
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Tue, 16 Apr 2013 00:24:39 +0000 (10:24 +1000)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Tue, 16 Apr 2013 08:04:22 +0000 (10:04 +0200)
Explicitly make the ethernet a child of the machine. This is needed to set
and use links pre-realize. Also makes the ethernet initialization consistent
with its peer DMA.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/microblaze/petalogix_ml605_mmu.c

index 70e7886c37f7fb97c8ccfb5de8f7625765857878..a5e9b358a50e35ecf9b2d6c14f8ae76ba4582156 100644 (file)
@@ -134,6 +134,8 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
     dma = qdev_create(NULL, "xlnx.axi-dma");
 
     /* FIXME: attach to the sysbus instead */
+    object_property_add_child(qdev_get_machine(), "xilinx-eth", OBJECT(eth0),
+                              NULL);
     object_property_add_child(qdev_get_machine(), "xilinx-dma", OBJECT(dma),
                               NULL);