diff options
author | Efimov Vasily <real@ispras.ru> | 2016-06-22 15:24:56 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-29 14:03:46 +0200 |
commit | 250263033c5343012b2cd6f01210ffb5b908a159 (patch) | |
tree | 3f6b6f916232b5767d3fafa18139a0567300b35a /hw | |
parent | ea5d42508c16947e84d020751e739c59262051de (diff) |
isa: introduce wrapper isa_connect_gpio_out
Currently a direct access to the device structure field is used to connect ISA
device IRQ to the bus. GPIO access should be used instead if possible.
The patch adds wrapper isa_connect_gpio_out. The function connects specified
output GPIO to specified ISA IRQ.
Signed-off-by: Efimov Vasily <real@ispras.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/isa/isa-bus.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 7aa115caf2..ce74db232a 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -97,6 +97,13 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq) dev->nirqs++; } +void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, int isairq) +{ + qemu_irq irq; + isa_init_irq(isadev, &irq, isairq); + qdev_connect_gpio_out(DEVICE(isadev), gpioirq, irq); +} + void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16) { assert(bus && dma8 && dma16); |