[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 07/18] hw/net/can/can_mioe3680_pci.c: switch Mioe3680PCIState
|
From: |
Mark Cave-Ayland |
|
Subject: |
[RFC PATCH 07/18] hw/net/can/can_mioe3680_pci.c: switch Mioe3680PCIState to use PCI device input gpio |
|
Date: |
Thu, 11 May 2023 09:57:20 +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/can/can_mioe3680_pci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/net/can/can_mioe3680_pci.c b/hw/net/can/can_mioe3680_pci.c
index b9918773b3..686bf16104 100644
--- a/hw/net/can/can_mioe3680_pci.c
+++ b/hw/net/can/can_mioe3680_pci.c
@@ -163,7 +163,7 @@ static void mioe3680_pci_realize(PCIDevice *pci_dev, Error
**errp)
pci_conf = pci_dev->config;
pci_conf[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
- d->irq = pci_allocate_irq(&d->dev);
+ d->irq = qdev_get_gpio_in_named(DEVICE(pci_dev), "pci-input-irq", 0);
for (i = 0 ; i < MIOe3680_PCI_SJA_COUNT; i++) {
can_sja_init(&d->sja_state[i], d->irq);
@@ -195,8 +195,6 @@ static void mioe3680_pci_exit(PCIDevice *pci_dev)
for (i = 0 ; i < MIOe3680_PCI_SJA_COUNT; i++) {
can_sja_disconnect(&d->sja_state[i]);
}
-
- qemu_free_irq(d->irq);
}
static const VMStateDescription vmstate_mioe3680_pci = {
--
2.30.2
- [RFC PATCH 01/18] hw/pci: add device IRQ to PCIDevice, (continued)
- [RFC PATCH 02/18] hw/pci: introduce PCI bus input IRQs, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 05/18] hw/char/serial-pci.c: switch SerialState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 06/18] hw/ide/ich.c: switch AHCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 07/18] hw/net/can/can_mioe3680_pci.c: switch Mioe3680PCIState to use PCI device input gpio,
Mark Cave-Ayland <=
- [RFC PATCH 08/18] hw/net/can/can_pcm3680_pci.c: switch SerialState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 09/18] hw/net/can/ctucan_pci.c: switch CtuCanPCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 10/18] hw/net/ne2000-pci.c: switch NE2000State to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 11/18] hw/net/pcnet-pci.c: switch PCIPCNetState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 12/18] hw/net/tulip.c: switch TULIPState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 13/18] hw/scsi/esp-pci.c: switch ESPState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 14/18] hw/sd/sdhci-pci.c: switch SDHCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 15/18] hw/usb/hcd-ehci-pci.c: switch EHCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 16/18] hw/usb/hcd-ohci-pci.c: switch OHCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11
- [RFC PATCH 17/18] hw/usb/hcd-uhci.c: switch UHCIState to use PCI device input gpio, Mark Cave-Ayland, 2023/05/11