diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-10-23 09:37:35 +0100 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2024-02-02 16:23:47 +0000 |
commit | cd53991de40a90399a8b56f0ad7b9320442ea5bb (patch) | |
tree | dc3c2f27d3a2b85da77ce357999b8fa086328b82 /hw/arm/integratorcp.c | |
parent | 8cef839c2d2f3fc2430570fd040104e3ed61dcf8 (diff) |
hw/net/smc91c111: use qemu_configure_nic_device()
Some callers instantiate the device unconditionally, others will do so only
if there is a NICInfo to go with it. This appears to be fairly random, but
preserve the existing behaviour of each caller for now.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/arm/integratorcp.c')
-rw-r--r-- | hw/arm/integratorcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 793262eca8..f016d20485 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -666,8 +666,9 @@ static void integratorcp_init(MachineState *machine) sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x1d000000); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[25]); - if (nd_table[0].used) - smc91c111_init(&nd_table[0], 0xc8000000, pic[27]); + if (qemu_find_nic_info("smc91c111", true, NULL)) { + smc91c111_init(0xc8000000, pic[27]); + } sysbus_create_simple("pl110", 0xc0000000, pic[22]); |