diff mbox

[RFC,v0,6/8] xilinx dont cast to interface types with links

Message ID f3fbbd49437f8dd56acbe6bcc659bb035f606021.1339578989.git.peter.crosthwaite@petalogix.com
State New
Headers show

Commit Message

Peter A. G. Crosthwaite June 13, 2012, 9:38 a.m. UTC
Something is broken with casting to an interface type then setting a link. Cast
these two to object for linking instead and it all works.

Needs investigation why.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 hw/petalogix_ml605_mmu.c |    4 ++--
 hw/xilinx.h              |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index 37866f4..4b1996b 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -129,9 +129,9 @@  petalogix_ml605_init(ram_addr_t ram_size,
     DeviceState *dma = qdev_create(NULL, "xilinx-axidma");
     DeviceState *eth0;
 
-    eth0 = xilinx_axiethernet_create(&nd_table[0], XILINX_AXIDMA_PEER(dma),
+    eth0 = xilinx_axiethernet_create(&nd_table[0], OBJECT(dma),
                                      0x82780000, irq[3], 0x1000, 0x1000);
-    xilinx_axiethernetdma_init(dma, XILINX_AXIDMA_PEER(eth0),
+    xilinx_axiethernetdma_init(dma, OBJECT(eth0),
                                0x84600000, irq[1], irq[0], 100 * 1000000);
 
     microblaze_load_kernel(cpu, ddr_base, ram_size, BINARY_DEVICE_TREE_FILE,
diff --git a/hw/xilinx.h b/hw/xilinx.h
index 5ccf3fa..0a940b8 100644
--- a/hw/xilinx.h
+++ b/hw/xilinx.h
@@ -50,7 +50,7 @@  xilinx_ethlite_create(NICInfo *nd, target_phys_addr_t base, qemu_irq irq,
 }
 
 static inline DeviceState *
-xilinx_axiethernet_create(NICInfo *nd, XilinxAXIDMAPeer *peer,
+xilinx_axiethernet_create(NICInfo *nd, Object *peer,
                           target_phys_addr_t base, qemu_irq irq,
                           int txmem, int rxmem)
 {
@@ -70,7 +70,7 @@  xilinx_axiethernet_create(NICInfo *nd, XilinxAXIDMAPeer *peer,
 }
 
 static inline void
-xilinx_axiethernetdma_init(DeviceState *dev, XilinxAXIDMAPeer *peer,
+xilinx_axiethernetdma_init(DeviceState *dev, Object *peer,
                            target_phys_addr_t base, qemu_irq irq,
                            qemu_irq irq2, int freqhz)
 {