[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/18] hw/ide/piix: Ensure IDE output IRQs are wired at realiz
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 06/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization |
Date: |
Thu, 2 Mar 2023 23:40:46 +0100 |
Ensure both IDE output IRQ lines are wired.
We can remove the last use of isa_get_irq(NULL).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/ide/piix.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index cb527553e2..91424e5249 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -134,14 +134,17 @@ static bool pci_piix_init_bus(PCIIDEState *d, unsigned i,
Error **errp)
static const struct {
int iobase;
int iobase2;
- int isairq;
} port_info[] = {
- {0x1f0, 0x3f6, 14},
- {0x170, 0x376, 15},
+ {0x1f0, 0x3f6},
+ {0x170, 0x376},
};
int ret;
- qemu_irq irq_out = d->isa_irq[i] ? : isa_get_irq(NULL,
port_info[i].isairq);
+ if (!d->isa_irq[i]) {
+ error_setg(errp, "output IDE IRQ %u not connected", i);
+ return false;
+ }
+
ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2);
ret = ide_bus_init_ioport_isa(&d->bus[i], NULL, port_info[i].iobase,
port_info[i].iobase2);
@@ -150,7 +153,7 @@ static bool pci_piix_init_bus(PCIIDEState *d, unsigned i,
Error **errp)
object_get_typename(OBJECT(d)), i);
return false;
}
- ide_bus_init_output_irq(&d->bus[i], irq_out);
+ ide_bus_init_output_irq(&d->bus[i], d->isa_irq[i]);
bmdma_init(&d->bus[i], &d->bmdma[i], d);
d->bmdma[i].bus = &d->bus[i];
--
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é, 2023/03/02
- [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é <=
- [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
- [PATCH v3 14/18] exec/ioport: Factor portio_list_register() out, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 15/18] hw/southbridge/piix: Use OBJECT_DECLARE_SIMPLE_TYPE() macro, Philippe Mathieu-Daudé, 2023/03/02
- [PATCH v3 16/18] hw/isa/piix: Batch register QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/03/02