@@ -80,6 +80,20 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq)
dev->nirqs++;
}
+void isa_discard_irq(ISADevice *dev, int isairq)
+{
+ int i, j;
+ for (i = 0; i < dev->nirqs; i++) {
+ if (dev->isairq[i] == isairq) {
+ for (j = i + 1; j < dev->nirqs; j++) {
+ dev->isairq[j - 1] = dev->isairq[j];
+ }
+ dev->nirqs--;
+ break;
+ }
+ }
+}
+
static void isa_init_ioport_one(ISADevice *dev, uint16_t ioport)
{
assert(dev->nioports < ARRAY_SIZE(dev->ioports));
@@ -28,6 +28,7 @@ ISABus *isa_bus_new(DeviceState *dev);
void isa_bus_irqs(qemu_irq *irqs);
qemu_irq isa_get_irq(int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
+void isa_discard_irq(ISADevice *dev, int isairq);
void isa_init_ioport(ISADevice *dev, uint16_t ioport);
void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
void isa_discard_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/isa-bus.c | 14 ++++++++++++++ hw/isa.h | 1 + 2 files changed, 15 insertions(+), 0 deletions(-)