escc: allow one IRQ per serial channel
The Z85C30 on the PowerMAC machines have one interrupt per serial
channel, while the Sparc machines have only one for both. Allow the
emulated device to use one IRQ per channel.
Patch by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6295 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/escc.c b/hw/escc.c
index d68f90b..372ad5a 100644
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -719,8 +719,9 @@
}
-int escc_init(target_phys_addr_t base, qemu_irq irq, CharDriverState *chrA,
- CharDriverState *chrB, int clock, int it_shift)
+int escc_init(target_phys_addr_t base, qemu_irq irqA, qemu_irq irqB,
+ CharDriverState *chrA, CharDriverState *chrB,
+ int clock, int it_shift)
{
int escc_io_memory, i;
SerialState *s;
@@ -741,9 +742,10 @@
s->chn[1].chr = chrA;
s->chn[0].disabled = 0;
s->chn[1].disabled = 0;
+ s->chn[0].irq = irqB;
+ s->chn[1].irq = irqA;
for (i = 0; i < 2; i++) {
- s->chn[i].irq = irq;
s->chn[i].chn = 1 - i;
s->chn[i].type = ser;
s->chn[i].clock = clock / 2;