[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 43/47] hw/xtensa/xtfpga: use qemu_create_nic_device()
From: |
David Woodhouse |
Subject: |
[PATCH v4 43/47] hw/xtensa/xtfpga: use qemu_create_nic_device() |
Date: |
Fri, 26 Jan 2024 17:25:20 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
hw/xtensa/xtfpga.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index fbad1c83a3..f49e6591dc 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -141,14 +141,16 @@ static void xtfpga_net_init(MemoryRegion *address_space,
hwaddr base,
hwaddr descriptors,
hwaddr buffers,
- qemu_irq irq, NICInfo *nd)
+ qemu_irq irq)
{
DeviceState *dev;
SysBusDevice *s;
MemoryRegion *ram;
- dev = qdev_new("open_eth");
- qdev_set_nic_properties(dev, nd);
+ dev = qemu_create_nic_device("open_eth", true, NULL);
+ if (!dev) {
+ return;
+ }
s = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(s, &error_fatal);
@@ -301,10 +303,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board,
MachineState *machine)
memory_region_add_subregion(system_memory, board->io[1], io);
}
xtfpga_fpga_init(system_io, 0x0d020000, freq);
- if (nd_table[0].used) {
- xtfpga_net_init(system_io, 0x0d030000, 0x0d030400, 0x0d800000,
- extints[1], nd_table);
- }
+ xtfpga_net_init(system_io, 0x0d030000, 0x0d030400, 0x0d800000, extints[1]);
serial_mm_init(system_io, 0x0d050020, 2, extints[0],
115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
--
2.43.0
- [PATCH v4 10/47] hw/hppa: use pci_init_nic_devices(), (continued)
- [PATCH v4 10/47] hw/hppa: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 16/47] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 22/47] hw/arm/aspeed: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info(), David Woodhouse, 2024/01/26
- [PATCH v4 45/47] hw/pci: remove pci_nic_init_nofail(), David Woodhouse, 2024/01/26
- [PATCH v4 08/47] hw/arm/sbsa-ref: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 15/47] hw/ppc/prep: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 43/47] hw/xtensa/xtfpga: use qemu_create_nic_device(),
David Woodhouse <=
- [PATCH v4 42/47] hw/sparc/sun4m: use qemu_find_nic_info(), David Woodhouse, 2024/01/26
- [PATCH v4 09/47] hw/arm/virt: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 01/47] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), David Woodhouse, 2024/01/26
- [PATCH v4 23/47] hw/arm/exynos4: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 06/47] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs, David Woodhouse, 2024/01/26
- [PATCH v4 32/47] hw/m68k/mcf5208: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 28/47] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases, David Woodhouse, 2024/01/26
- [PATCH v4 27/47] hw/arm/highbank: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 11/47] hw/loongarch: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 03/47] net: add qemu_create_nic_bus_devices(), David Woodhouse, 2024/01/26