aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-10-23 09:37:37 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2024-02-02 16:23:47 +0000
commit27c0235f72141e05bb4a815526bcdb777fa9f5bb (patch)
tree5003a4c72626da57284c02144715b1ae5b65e621
parentf138ed5e005db9d8ce1eb511bea7c9da4333da76 (diff)
downloadqemu-27c0235f72141e05bb4a815526bcdb777fa9f5bb.zip
qemu-27c0235f72141e05bb4a815526bcdb777fa9f5bb.tar.gz
qemu-27c0235f72141e05bb4a815526bcdb777fa9f5bb.tar.bz2
hw/arm/highbank: use qemu_create_nic_device()
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--hw/arm/highbank.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index e6e27d6..e123747 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -297,19 +297,17 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
sysbus_create_simple(TYPE_SYSBUS_AHCI, 0xffe08000, pic[83]);
- if (nd_table[0].used) {
- qemu_check_nic_model(&nd_table[0], "xgmac");
- dev = qdev_new("xgmac");
- qdev_set_nic_properties(dev, &nd_table[0]);
+ dev = qemu_create_nic_device("xgmac", true, NULL);
+ if (dev) {
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xfff50000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[77]);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 1, pic[78]);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 2, pic[79]);
+ }
- qemu_check_nic_model(&nd_table[1], "xgmac");
- dev = qdev_new("xgmac");
- qdev_set_nic_properties(dev, &nd_table[1]);
+ dev = qemu_create_nic_device("xgmac", true, NULL);
+ if (dev) {
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xfff51000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[80]);