mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
33c5eb02c4
commit
4b10c8d701
3 changed files with 32 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue