diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-02-09 11:55:03 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-02-27 22:29:02 +0100 |
commit | d2fbec575f652dc35239c5b026f7ebabc548beb1 (patch) | |
tree | be47d0668f694fe727eb1ee63409d533a3f9d761 /include | |
parent | dc8d6cf2033c813ade9863a926f2d71a22edd249 (diff) | |
download | qemu-d2fbec575f652dc35239c5b026f7ebabc548beb1.zip qemu-d2fbec575f652dc35239c5b026f7ebabc548beb1.tar.gz qemu-d2fbec575f652dc35239c5b026f7ebabc548beb1.tar.bz2 |
hw/isa: Factor isa_bus_get_irq() out of isa_get_irq()
isa_get_irq() was added in commit 3a38d437ca
("Add isa_reserve_irq()" Fri Aug 14 11:36:15 2009) as:
a temporary interface to be used to allocate ISA IRQs for
devices which have not yet been converted to qdev, and for
special cases which are not suited for qdev conversions,
such as the 'ferr'.
We still use it 14 years later, using the global 'isabus'
singleton. In order to get rid of such *temporary* interface,
extract isa_bus_get_irq() which can take any ISABus* object.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230215161641.32663-3-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/isa/isa.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 3a60f6a..40d6224 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -72,6 +72,14 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); +/** + * isa_bus_get_irq: Return input IRQ on ISA bus. + * @bus: the #ISABus to plug ISA devices on. + * @irqnum: the ISA IRQ number. + * + * Return IRQ @irqnum from the PIC associated on ISA @bus. + */ +qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); |