lasi: move PS2 initialisation to machine.c
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 4 May 2022 09:25:46 +0000 (10:25 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 8 May 2022 17:52:37 +0000 (18:52 +0100)
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-37-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/hppa/lasi.c
hw/hppa/machine.c

index 753a08d4541b8429b7b1e09808d3cde5c29be844..9d8c9e39369b2e7dd5ddf755946767ad3aba24b3 100644 (file)
@@ -18,7 +18,6 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/runstate.h"
 #include "hppa_sys.h"
-#include "hw/input/lasips2.h"
 #include "migration/vmstate.h"
 #include "qom/object.h"
 #include "lasi.h"
@@ -235,10 +234,6 @@ LasiState *lasi_initfn(MemoryRegion *address_space)
     dev = qdev_new(TYPE_LASI_CHIP);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
-    /* PS/2 Keyboard/Mouse */
-    lasips2_init(address_space, LASI_PS2KBD_HPA,
-                 qdev_get_gpio_in(dev, LASI_IRQ_PS2KBD_HPA));
-
     return LASI_CHIP(dev);
 }
 
index 5b43ae2960c6b6fcbfe98012df77f322babbe638..1d48ec341d3c2ab4a7d640905fc8d96b249ece92 100644 (file)
@@ -16,6 +16,7 @@
 #include "hw/timer/i8254.h"
 #include "hw/char/serial.h"
 #include "hw/char/parallel.h"
+#include "hw/input/lasips2.h"
 #include "hw/net/lasi_82596.h"
 #include "hw/nmi.h"
 #include "hw/pci-host/dino.h"
@@ -245,6 +246,10 @@ static void machine_hppa_init(MachineState *machine)
         }
     }
 
+    /* PS/2 Keyboard/Mouse */
+    lasips2_init(addr_space, LASI_PS2KBD_HPA,
+                 qdev_get_gpio_in(lasi_dev, LASI_IRQ_PS2KBD_HPA));
+
     /* register power switch emulation */
     qemu_register_powerdown_notifier(&hppa_system_powerdown_notifier);