qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 12/18] hw/net/tulip.c: switch TULIPState to use PCI device in


From: Mark Cave-Ayland
Subject: [RFC PATCH 12/18] hw/net/tulip.c: switch TULIPState to use PCI device input gpio
Date: Thu, 11 May 2023 09:57:25 +0100

This replaces the call to pci_allocate_irq() and also allows the corresponding
qemu_free_irq() to be removed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/net/tulip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 915e5fb595..0b4bd8af51 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -979,7 +979,7 @@ static void pci_tulip_realize(PCIDevice *pci_dev, Error 
**errp)
     pci_register_bar(&s->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io);
     pci_register_bar(&s->dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->memory);
 
-    s->irq = pci_allocate_irq(&s->dev);
+    s->irq = qdev_get_gpio_in_named(DEVICE(pci_dev), "pci-input-irq", 0);
 
     s->nic = qemu_new_nic(&net_tulip_info, &s->c,
                           object_get_typename(OBJECT(pci_dev)),
@@ -992,7 +992,6 @@ static void pci_tulip_exit(PCIDevice *pci_dev)
     TULIPState *s = DO_UPCAST(TULIPState, dev, pci_dev);
 
     qemu_del_nic(s->nic);
-    qemu_free_irq(s->irq);
     eeprom93xx_free(&pci_dev->qdev, s->eeprom);
 }
 
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]