diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-10-23 09:37:41 +0100 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2024-02-02 16:23:47 +0000 |
commit | e8c003c41411f89f797aafc255b6d09f078726cb (patch) | |
tree | 3a202ea27b8d216b6076496fa33b10cb25169803 /hw/arm/xilinx_zynq.c | |
parent | 13280845886c94fff7278e1d1fe0fa12e03700ad (diff) | |
download | qemu-e8c003c41411f89f797aafc255b6d09f078726cb.zip qemu-e8c003c41411f89f797aafc255b6d09f078726cb.tar.gz qemu-e8c003c41411f89f797aafc255b6d09f078726cb.tar.bz2 |
hw/arm: use qemu_configure_nic_device()
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/arm/xilinx_zynq.c')
-rw-r--r-- | hw/arm/xilinx_zynq.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 66d0de1..35fa804 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -109,16 +109,13 @@ static void zynq_write_board_setup(ARMCPU *cpu, static struct arm_boot_info zynq_binfo = {}; -static void gem_init(NICInfo *nd, uint32_t base, qemu_irq irq) +static void gem_init(uint32_t base, qemu_irq irq) { DeviceState *dev; SysBusDevice *s; dev = qdev_new(TYPE_CADENCE_GEM); - if (nd->used) { - qemu_check_nic_model(nd, TYPE_CADENCE_GEM); - qdev_set_nic_properties(dev, nd); - } + qemu_configure_nic_device(dev, true, NULL); object_property_set_int(OBJECT(dev), "phy-addr", 7, &error_abort); s = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(s, &error_fatal); @@ -280,8 +277,8 @@ static void zynq_init(MachineState *machine) sysbus_create_varargs("cadence_ttc", 0xF8002000, pic[69-IRQ_OFFSET], pic[70-IRQ_OFFSET], pic[71-IRQ_OFFSET], NULL); - gem_init(&nd_table[0], 0xE000B000, pic[54-IRQ_OFFSET]); - gem_init(&nd_table[1], 0xE000C000, pic[77-IRQ_OFFSET]); + gem_init(0xE000B000, pic[54 - IRQ_OFFSET]); + gem_init(0xE000C000, pic[77 - IRQ_OFFSET]); for (n = 0; n < 2; n++) { int hci_irq = n ? 79 : 56; |