[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 06/10] serial: Allow to reconfigure ISA IRQ
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [RFC 06/10] serial: Allow to reconfigure ISA IRQ |
Date: |
Mon, 6 Jun 2011 18:20:55 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/isa.h | 1 +
hw/serial.c | 11 +++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/isa.h b/hw/isa.h
index 8bd082a..b577fe3 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -47,6 +47,7 @@ void parallel_isa_reconfigure_irq(ISADevice *dev, uint32_t
isairq);
/* serial.c */
void serial_isa_reconfigure_iobase(ISADevice *dev, uint32_t base);
+void serial_isa_reconfigure_irq(ISADevice *dev, uint32_t isairq);
/* dma.c */
int DMA_get_channel_mode (int nchan);
diff --git a/hw/serial.c b/hw/serial.c
index dd91272..714e5b2 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -771,6 +771,17 @@ void serial_isa_reconfigure_iobase(ISADevice *dev,
uint32_t iobase)
}
}
+void serial_isa_reconfigure_irq(ISADevice *dev, uint32_t isairq)
+{
+ ISASerialState *isa = DO_UPCAST(ISASerialState, dev, dev);
+
+ if (isairq != isa->isairq) {
+ isa_discard_irq(dev, isa->isairq);
+ isa->isairq = isairq;
+ isa_init_irq(dev, &isa->state.irq, isa->isairq);
+ }
+}
+
static const int isa_serial_io[MAX_SERIAL_PORTS] = { 0x3f8, 0x2f8, 0x3e8,
0x2e8 };
static const int isa_serial_irq[MAX_SERIAL_PORTS] = { 4, 3, 4, 3 };
--
1.7.5.3
- [Qemu-devel] [RFC 00/10] ISA reconfigurability, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 01/10] isa: Allow to un-assign I/O ports, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 02/10] isa: Allow to un-associate an IRQ, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 03/10] parallel: Allow to reconfigure ISA I/O base, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 04/10] parallel: Allow to reconfigure ISA IRQ, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 05/10] serial: Allow to reconfigure ISA I/O base, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 06/10] serial: Allow to reconfigure ISA IRQ,
Andreas Färber <=
- [Qemu-devel] [PATCH v2 07/10] fdc: Parametrize ISA base, IRQ and DMA, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 08/10] fdc: Allow to reconfigure ISA I/O base, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 09/10] ide: Allow to reconfigure ISA I/O base, Andreas Färber, 2011/06/06
- [Qemu-devel] [RFC 10/10] prep: Add pc87312 Super I/O emulation, Andreas Färber, 2011/06/06
- Re: [Qemu-devel] [RFC 05/10] serial: Allow to reconfigure ISA I/O base, Richard Henderson, 2011/06/06
- Re: [Qemu-devel] [RFC 05/10] serial: Allow to reconfigure ISA I/O base, Andreas Färber, 2011/06/06
Re: [Qemu-devel] [RFC 00/10] ISA reconfigurability, Gerd Hoffmann, 2011/06/07