summaryrefslogtreecommitdiff
path: root/hw/slavio_serial.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-01 16:05:41 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-01 16:05:41 +0000
commit52cc07d04774676c69e3998cdb5d10c8f5286072 (patch)
treefaa2f9256f55845154f602a57f4443456e367db9 /hw/slavio_serial.c
parente0353fe250eacac23104ff7fe466cd6533536509 (diff)
Change Sparc uses of pic_set_irq to pic_set_irq_new
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2572 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/slavio_serial.c')
-rw-r--r--hw/slavio_serial.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/hw/slavio_serial.c b/hw/slavio_serial.c
index e72bb70e05..847710e3d1 100644
--- a/hw/slavio_serial.c
+++ b/hw/slavio_serial.c
@@ -52,8 +52,9 @@
#ifdef DEBUG_SERIAL
#define SER_DPRINTF(fmt, args...) \
do { printf("SER: " fmt , ##args); } while (0)
-#define pic_set_irq(irq, level) \
-do { printf("SER: set_irq(%d): %d\n", (irq), (level)); pic_set_irq((irq),(level));} while (0)
+#define pic_set_irq_new(intctl, irq, level) \
+ do { printf("SER: set_irq(%d): %d\n", (irq), (level)); \
+ pic_set_irq_new((intctl), (irq),(level));} while (0)
#else
#define SER_DPRINTF(fmt, args...)
#endif
@@ -97,6 +98,7 @@ typedef struct ChannelState {
uint8_t rx, tx, wregs[16], rregs[16];
SERIOQueue queue;
CharDriverState *chr;
+ void *intctl;
} ChannelState;
struct SerialState {
@@ -164,7 +166,7 @@ static void slavio_serial_update_irq(ChannelState *s)
irq = slavio_serial_update_irq_chn(s);
irq |= slavio_serial_update_irq_chn(s->otherchn);
- pic_set_irq(s->irq, irq);
+ pic_set_irq_new(s->intctl, s->irq, irq);
}
static void slavio_serial_reset_chn(ChannelState *s)
@@ -545,7 +547,8 @@ static int slavio_serial_load(QEMUFile *f, void *opaque, int version_id)
}
-SerialState *slavio_serial_init(int base, int irq, CharDriverState *chr1, CharDriverState *chr2)
+SerialState *slavio_serial_init(int base, int irq, CharDriverState *chr1,
+ CharDriverState *chr2, void *intctl)
{
int slavio_serial_io_memory, i;
SerialState *s;
@@ -564,6 +567,7 @@ SerialState *slavio_serial_init(int base, int irq, CharDriverState *chr1, CharDr
s->chn[i].irq = irq;
s->chn[i].chn = 1 - i;
s->chn[i].type = ser;
+ s->chn[i].intctl = intctl;
if (s->chn[i].chr) {
qemu_chr_add_handlers(s->chn[i].chr, serial_can_receive,
serial_receive1, serial_event, &s->chn[i]);
@@ -661,7 +665,7 @@ static void sunmouse_event(void *opaque,
put_queue(s, 0);
}
-void slavio_serial_ms_kbd_init(int base, int irq)
+void slavio_serial_ms_kbd_init(int base, int irq, void *intctl)
{
int slavio_serial_io_memory, i;
SerialState *s;
@@ -673,6 +677,7 @@ void slavio_serial_ms_kbd_init(int base, int irq)
s->chn[i].irq = irq;
s->chn[i].chn = 1 - i;
s->chn[i].chr = NULL;
+ s->chn[i].intctl = intctl;
}
s->chn[0].otherchn = &s->chn[1];
s->chn[1].otherchn = &s->chn[0];