aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-12-21 07:32:57 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2018-01-09 21:48:19 +0000
commit4b10c8d7012eea39e96819545eb21d28228831c6 (patch)
tree34c80f9ee32da41909708cdfa02f3b063c1713d2 /hw/pci-host
parent33c5eb02c4f51515896a5a13cb68f6f01ce8d0af (diff)
downloadqemu-4b10c8d7012eea39e96819545eb21d28228831c6.zip
qemu-4b10c8d7012eea39e96819545eb21d28228831c6.tar.gz
qemu-4b10c8d7012eea39e96819545eb21d28228831c6.tar.bz2
ebus: wire up OBIO interrupts to APB pbm via qdev GPIOs
This enables us to remove the static array mapping in the ISA IRQ handler (and the embedded reference to the APB device) by formalising the interrupt wiring via the qdev GPIO API. For more clarity we replace the APB OBIO interrupt numbers with constants designating the interrupt source, and rename isa_irq_handler() to ebus_isa_irq_handler(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/apb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index 5562f1a..54edbdd 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -703,7 +703,7 @@ static void pci_pbm_init(Object *obj)
for (i = 0; i < 32; i++) {
s->obio_irq_map[i] = ((0x1f << 6) | 0x20) + i;
}
- s->pbm_irqs = qemu_allocate_irqs(pci_apb_set_irq, s, MAX_IVEC);
+ qdev_init_gpio_in_named(DEVICE(s), pci_apb_set_irq, "pbm-irq", MAX_IVEC);
qdev_init_gpio_out_named(DEVICE(s), s->ivec_irqs, "ivec-irq", MAX_IVEC);
s->irq_request = NO_IRQ_REQUEST;
s->pci_irq_in = 0ULL;