diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-10-23 09:37:43 +0100 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2024-02-02 16:23:47 +0000 |
commit | f52f3b342e3887c44b4f6c48a0361f3a6b63910f (patch) | |
tree | 783803508d470c324f762d0b7966047721aa2b68 /hw/cris | |
parent | e8c003c41411f89f797aafc255b6d09f078726cb (diff) | |
download | qemu-f52f3b342e3887c44b4f6c48a0361f3a6b63910f.zip qemu-f52f3b342e3887c44b4f6c48a0361f3a6b63910f.tar.gz qemu-f52f3b342e3887c44b4f6c48a0361f3a6b63910f.tar.bz2 |
hw/net/etraxfs-eth: 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/cris')
-rw-r--r-- | hw/cris/axis_dev88.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c index d82050d..5556634 100644 --- a/hw/cris/axis_dev88.c +++ b/hw/cris/axis_dev88.c @@ -308,15 +308,14 @@ void axisdev88_init(MachineState *machine) /* Add the two ethernet blocks. */ dma_eth = g_malloc0(sizeof dma_eth[0] * 4); /* Allocate 4 channels. */ - etraxfs_eth_init(&nd_table[0], 0x30034000, 1, &dma_eth[0], &dma_eth[1]); - if (nb_nics > 1) { - etraxfs_eth_init(&nd_table[1], 0x30036000, 2, &dma_eth[2], &dma_eth[3]); - } + etraxfs_eth_init(0x30034000, 1, &dma_eth[0], &dma_eth[1]); /* The DMA Connector block is missing, hardwire things for now. */ etraxfs_dmac_connect_client(etraxfs_dmac, 0, &dma_eth[0]); etraxfs_dmac_connect_client(etraxfs_dmac, 1, &dma_eth[1]); - if (nb_nics > 1) { + + if (qemu_find_nic_info("etraxfs-eth", true, "fseth")) { + etraxfs_eth_init(0x30036000, 2, &dma_eth[2], &dma_eth[3]); etraxfs_dmac_connect_client(etraxfs_dmac, 6, &dma_eth[2]); etraxfs_dmac_connect_client(etraxfs_dmac, 7, &dma_eth[3]); } |