aboutsummaryrefslogtreecommitdiff
path: root/hw/input/pckbd.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-06-24 14:40:50 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-06-26 18:40:12 +0100
commitc2b1747973d1ff334787d9701cf8214e24fe0798 (patch)
tree71aa68415edd00cbd8e7ef887454b3ae9f3c5868 /hw/input/pckbd.c
parent6beb79e11a48b7876dfd63fcfb51d1a603936928 (diff)
pckbd: replace irq_kbd and irq_mouse with qemu_irq array in KBDState
This allows both IRQs to be declared as a single qdev gpio array. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Helge Deller <deller@gmx.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220624134109.881989-36-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/input/pckbd.c')
-rw-r--r--hw/input/pckbd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 72843f770e..5d7c969fc6 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -170,8 +170,8 @@ static void kbd_update_irq_lines(KBDState *s)
}
}
}
- qemu_set_irq(s->irq_kbd, irq_kbd_level);
- qemu_set_irq(s->irq_mouse, irq_mouse_level);
+ qemu_set_irq(s->irqs[I8042_KBD_IRQ], irq_kbd_level);
+ qemu_set_irq(s->irqs[I8042_MOUSE_IRQ], irq_mouse_level);
}
static void kbd_deassert_irq(KBDState *s)
@@ -726,8 +726,8 @@ MMIOKBDState *i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
s = &I8042_MMIO(dev)->kbd;
- s->irq_kbd = kbd_irq;
- s->irq_mouse = mouse_irq;
+ s->irqs[I8042_KBD_IRQ] = kbd_irq;
+ s->irqs[I8042_MOUSE_IRQ] = mouse_irq;
return I8042_MMIO(dev);
}
@@ -813,8 +813,8 @@ static void i8042_realizefn(DeviceState *dev, Error **errp)
return;
}
- s->irq_kbd = isa_get_irq(isadev, isa_s->kbd_irq);
- s->irq_mouse = isa_get_irq(isadev, isa_s->mouse_irq);
+ s->irqs[I8042_KBD_IRQ] = isa_get_irq(isadev, isa_s->kbd_irq);
+ s->irqs[I8042_MOUSE_IRQ] = isa_get_irq(isadev, isa_s->mouse_irq);
isa_register_ioport(isadev, isa_s->io + 0, 0x60);
isa_register_ioport(isadev, isa_s->io + 1, 0x64);