[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus I
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 05/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15 |
Date: |
Wed, 15 Feb 2023 17:16:28 +0100 |
Since pc_init1() has access to the ISABus*, retrieve the
ISA IRQs with isa_bus_get_irq().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_piix.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 7085b4bc58..983baf0211 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -277,7 +277,13 @@ static void pc_init1(MachineState *machine,
if (pcmc->pci_enabled) {
PCIDevice *dev;
- dev = pci_create_simple(pci_bus, piix3_devfn + 1, TYPE_PIIX3_IDE);
+ dev = pci_new_multifunction(piix3_devfn + 1, false, TYPE_PIIX3_IDE);
+ qdev_connect_gpio_out_named(DEVICE(dev), "ide-irq", 0,
+ isa_bus_get_irq(isa_bus, 14));
+ qdev_connect_gpio_out_named(DEVICE(dev), "ide-irq", 1,
+ isa_bus_get_irq(isa_bus, 15));
+ pci_realize_and_unref(dev, pci_bus, &error_fatal);
+
pci_ide_create_devs(dev);
idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
--
2.38.1
- [PATCH v2 00/18] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 01/18] hw/isa: Rename isa_get_dma() -> isa_bus_get_dma(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 02/18] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq(), Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 03/18] hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available, Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 04/18] hw/ide/piix: Expose output IRQ as properties for late object population, Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 05/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15,
Philippe Mathieu-Daudé <=
- [PATCH v2 06/18] hw/isa/piix4: Wire PIIX4 IDE ouput IRQs to ISA bus IRQs 14/15, Philippe Mathieu-Daudé, 2023/02/15
- [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Philippe Mathieu-Daudé, 2023/02/15
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Bernhard Beschow, 2023/02/16
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Philippe Mathieu-Daudé, 2023/02/16
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Bernhard Beschow, 2023/02/16
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Philippe Mathieu-Daudé, 2023/02/19
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Bernhard Beschow, 2023/02/20
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, BALATON Zoltan, 2023/02/20
- Re: [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Daniel P . Berrangé, 2023/02/21
[PATCH v2 08/18] hw/isa: Deprecate isa_get_irq() in favor of isa_bus_get_irq(), Philippe Mathieu-Daudé, 2023/02/15