[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus I
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 03/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15 |
Date: |
Thu, 2 Mar 2023 23:40:43 +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 126b6c11df..1e90b9ff0d 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 v3 00/18] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport(), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 01/18] hw/ide/piix: Expose output IRQ as properties for late object population, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 02/18] hw/ide/piix: Allow using PIIX3-IDE as standalone PCI function, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 03/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15,
Philippe Mathieu-Daudé <=
- [PATCH v3 04/18] hw/isa/piix4: Wire PIIX4 IDE ouput IRQs to ISA bus IRQs 14/15, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 05/18] hw/ide: Rename ISA specific ide_init_ioport -> ide_bus_init_ioport_isa, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 06/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 07/18] hw/isa: Deprecate isa_get_irq() in favor of isa_bus_get_irq(), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 08/18] hw/ide: Introduce generic ide_init_ioport(), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 09/18] hw/ide/piix: Use generic ide_bus_init_ioport(), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 10/18] hw/isa: Ensure isa_register_portio_list() do not get NULL ISA device, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 11/18] hw/isa: Simplify isa_address_space[_io](), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 12/18] hw/isa: Reduce 'isabus' singleton scope to isa_bus_new(), Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 13/18] exec/ioport: Factor portio_list_register_flush_coalesced() out, Philippe Mathieu-Daudé, 2023/03/02