aboutsummaryrefslogtreecommitdiff
path: root/hw/pckbd.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-07 18:14:41 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-07 18:14:41 +0000
commitd537cf6c8624b27ce2b63431d2f8937f6356f652 (patch)
treed7173d79977b4426b2ff225b35c839c8a2e4a215 /hw/pckbd.c
parentb6e27ab8b12ef6075d85fc505f821643804a3a79 (diff)
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pckbd.c')
-rw-r--r--hw/pckbd.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 0ace3c0c9c..a6f9d09caf 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -122,8 +122,8 @@ typedef struct KBDState {
void *kbd;
void *mouse;
- int irq_kbd;
- int irq_mouse;
+ qemu_irq irq_kbd;
+ qemu_irq irq_mouse;
} KBDState;
KBDState kbd_state;
@@ -151,8 +151,8 @@ static void kbd_update_irq(KBDState *s)
irq_kbd_level = 1;
}
}
- pic_set_irq(s->irq_kbd, irq_kbd_level);
- pic_set_irq(s->irq_mouse, irq_mouse_level);
+ qemu_set_irq(s->irq_kbd, irq_kbd_level);
+ qemu_set_irq(s->irq_mouse, irq_mouse_level);
}
static void kbd_update_kbd_irq(void *opaque, int level)
@@ -356,12 +356,12 @@ static int kbd_load(QEMUFile* f, void* opaque, int version_id)
return 0;
}
-void i8042_init(int kbd_irq_lvl, int mouse_irq_lvl, uint32_t io_base)
+void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base)
{
KBDState *s = &kbd_state;
- s->irq_kbd = kbd_irq_lvl;
- s->irq_mouse = mouse_irq_lvl;
+ s->irq_kbd = kbd_irq;
+ s->irq_mouse = mouse_irq;
kbd_reset(s);
register_savevm("pckbd", 0, 3, kbd_save, kbd_load, s);
@@ -377,8 +377,3 @@ void i8042_init(int kbd_irq_lvl, int mouse_irq_lvl, uint32_t io_base)
#endif
qemu_register_reset(kbd_reset, s);
}
-
-void kbd_init(void)
-{
- return i8042_init(1, 12, 0x60);
-}