Skip to content

Commit

Permalink
hw/microblaze: use qemu_configure_nic_device()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
dwmw2 committed Feb 1, 2024
1 parent 7c6a94a commit a7a8adc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions hw/microblaze/petalogix_ml605_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ petalogix_ml605_init(MachineState *machine)
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]);

/* axi ethernet and dma initialization. */
qemu_check_nic_model(&nd_table[0], "xlnx.axi-ethernet");
eth0 = qdev_new("xlnx.axi-ethernet");
dma = qdev_new("xlnx.axi-dma");

Expand All @@ -145,7 +144,7 @@ petalogix_ml605_init(MachineState *machine)
"axistream-connected-target", NULL);
cs = object_property_get_link(OBJECT(dma),
"axistream-control-connected-target", NULL);
qdev_set_nic_properties(eth0, &nd_table[0]);
qemu_configure_nic_device(eth0, true, NULL);
qdev_prop_set_uint32(eth0, "rxmem", 0x1000);
qdev_prop_set_uint32(eth0, "txmem", 0x1000);
object_property_set_link(OBJECT(eth0), "axistream-connected", ds,
Expand Down
3 changes: 1 addition & 2 deletions hw/microblaze/petalogix_s3adsp1800_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ petalogix_s3adsp1800_init(MachineState *machine)
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, TIMER_BASEADDR);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]);

qemu_check_nic_model(&nd_table[0], "xlnx.xps-ethernetlite");
dev = qdev_new("xlnx.xps-ethernetlite");
qdev_set_nic_properties(dev, &nd_table[0]);
qemu_configure_nic_device(dev, true, NULL);
qdev_prop_set_uint32(dev, "tx-ping-pong", 0);
qdev_prop_set_uint32(dev, "rx-ping-pong", 0);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
Expand Down

0 comments on commit a7a8adc

Please sign in to comment.