pckbd: move ISAKBDState from pckbd.c to i8042.h
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 24 Jun 2022 13:40:35 +0000 (14:40 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 26 Jun 2022 17:40:11 +0000 (18:40 +0100)
This allows the QOM types in pckbd.c to be used elsewhere by simply including
i8042.h.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220624134109.881989-21-mark.cave-ayland@ilande.co.uk>

hw/input/pckbd.c
include/hw/input/i8042.h

index 7b14cd007e3d68c205c63c3df3bcc0fd682d3e73..f99e10cfcf734d2b3e028e6c1b7debe3093085f3 100644 (file)
@@ -686,16 +686,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
     qemu_register_reset(kbd_reset, s);
 }
 
-struct ISAKBDState {
-    ISADevice parent_obj;
-
-    KBDState kbd;
-    bool kbd_throttle;
-    MemoryRegion io[2];
-    uint8_t kbd_irq;
-    uint8_t mouse_irq;
-};
-
 void i8042_isa_mouse_fake_event(ISAKBDState *isa)
 {
     KBDState *s = &isa->kbd;
index 84b5aa7f2355db39fe6185bb69bcdb485fc9928c..a246250d1fab64fd36e38cae372a4a3336b4982a 100644 (file)
@@ -39,6 +39,16 @@ typedef struct KBDState {
 #define TYPE_I8042 "i8042"
 OBJECT_DECLARE_SIMPLE_TYPE(ISAKBDState, I8042)
 
+struct ISAKBDState {
+    ISADevice parent_obj;
+
+    KBDState kbd;
+    bool kbd_throttle;
+    MemoryRegion io[2];
+    uint8_t kbd_irq;
+    uint8_t mouse_irq;
+};
+
 #define I8042_A20_LINE "a20"