@@ -43,6 +43,7 @@ void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
/* parallel.c */
void parallel_isa_reconfigure_iobase(ISADevice *dev, uint32_t base);
+void parallel_isa_reconfigure_irq(ISADevice *dev, uint32_t isairq);
/* dma.c */
int DMA_get_channel_mode (int nchan);
@@ -493,6 +493,18 @@ void parallel_isa_reconfigure_iobase(ISADevice *dev, uint32_t base)
}
}
+void parallel_isa_reconfigure_irq(ISADevice *dev, uint32_t isairq)
+{
+ ISAParallelState *isa = DO_UPCAST(ISAParallelState, dev, dev);
+ ParallelState *s = &isa->state;
+
+ if (isairq != isa->isairq) {
+ isa_discard_irq(dev, isa->isairq);
+ isa->isairq = isairq;
+ isa_init_irq(dev, &s->irq, isa->isairq);
+ }
+}
+
static const int isa_parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
static int parallel_isa_initfn(ISADevice *dev)
@@ -516,6 +528,7 @@ static int parallel_isa_initfn(ISADevice *dev)
index++;
isa_init_irq(dev, &s->irq, isa->isairq);
+
qemu_register_reset(parallel_reset, s);
if (qemu_chr_ioctl(s->chr, CHR_IOCTL_PP_READ_STATUS, &dummy) == 0) {
Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/isa.h | 1 + hw/parallel.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-)