aboutsummaryrefslogtreecommitdiff
path: root/hw/microblaze
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-02-25 16:41:49 -0800
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-02-26 14:54:45 +1000
commitd91a68a73b6457c22b743e158e36894ccaa489bc (patch)
treecd04a409cef60138f22a08db2067820bdb93dcfb /hw/microblaze
parentb8d4e1c43b06caadf96c350511201fd50642e4f2 (diff)
xilinx: Inline usages of xilinx_axi*_init()
Inline the only usage of each of xilinx_axiethernet_init and xilinx_axidma_init. Converts this init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'hw/microblaze')
-rw-r--r--hw/microblaze/petalogix_ml605_mmu.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index 39f91dd9bc..347889f305 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -156,16 +156,30 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
"axistream-connected-target", NULL);
cs = object_property_get_link(OBJECT(dma),
"axistream-control-connected-target", NULL);
- xilinx_axiethernet_init(eth0, &nd_table[0], STREAM_SLAVE(ds),
- STREAM_SLAVE(cs), 0x82780000, irq[3], 0x1000,
- 0x1000);
+ qdev_set_nic_properties(eth0, &nd_table[0]);
+ qdev_prop_set_uint32(eth0, "rxmem", 0x1000);
+ qdev_prop_set_uint32(eth0, "txmem", 0x1000);
+ object_property_set_link(OBJECT(eth0), OBJECT(ds),
+ "axistream-connected", &error_abort);
+ object_property_set_link(OBJECT(eth0), OBJECT(cs),
+ "axistream-control-connected", &error_abort);
+ qdev_init_nofail(eth0);
+ sysbus_mmio_map(SYS_BUS_DEVICE(eth0), 0, AXIENET_BASEADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(eth0), 0, irq[AXIENET_IRQ]);
ds = object_property_get_link(OBJECT(eth0),
"axistream-connected-target", NULL);
cs = object_property_get_link(OBJECT(eth0),
"axistream-control-connected-target", NULL);
- xilinx_axidma_init(dma, STREAM_SLAVE(ds), STREAM_SLAVE(cs), 0x84600000,
- irq[1], irq[0], 100 * 1000000);
+ qdev_prop_set_uint32(dma, "freqhz", 100 * 1000000);
+ object_property_set_link(OBJECT(dma), OBJECT(ds),
+ "axistream-connected", &error_abort);
+ object_property_set_link(OBJECT(dma), OBJECT(cs),
+ "axistream-control-connected", &error_abort);
+ qdev_init_nofail(dma);
+ sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, AXIDMA_BASEADDR);
+ sysbus_connect_irq(SYS_BUS_DEVICE(dma), 0, irq[AXIDMA_IRQ0]);
+ sysbus_connect_irq(SYS_BUS_DEVICE(dma), 1, irq[AXIDMA_IRQ1]);
{
SSIBus *spi;