aboutsummaryrefslogtreecommitdiff
path: root/hw/hppa
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2019-12-20 22:15:10 +0100
committerRichard Henderson <richard.henderson@linaro.org>2020-01-27 10:49:51 -0800
commit2a6505b0e79e553ed11570fb484071f3e5293cff (patch)
tree5af7510a955b00f49e8a5c294c3d863a04917249 /hw/hppa
parentc56b6209189f6a4945562dc772cff440f03e4868 (diff)
hppa: add emulation of LASI PS2 controllers
Signed-off-by: Sven Schnelle <svens@stackframe.org> Message-Id: <20191220211512.3289-5-svens@stackframe.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/hppa')
-rw-r--r--hw/hppa/Kconfig1
-rw-r--r--hw/hppa/lasi.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig
index 2a7b38d6d6..7f9be7f25c 100644
--- a/hw/hppa/Kconfig
+++ b/hw/hppa/Kconfig
@@ -11,3 +11,4 @@ config DINO
select MC146818RTC
select LSI_SCSI_PCI
select LASI_82596
+ select LASIPS2
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 51752589f3..d8d03f95c0 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -22,6 +22,7 @@
#include "hw/net/lasi_82596.h"
#include "hw/char/parallel.h"
#include "hw/char/serial.h"
+#include "hw/input/lasips2.h"
#include "exec/address-spaces.h"
#include "migration/vmstate.h"
@@ -324,6 +325,7 @@ DeviceState *lasi_init(MemoryRegion *address_space)
lpt_irq, parallel_hds[0]);
/* Real time clock (RTC), it's only one 32-bit counter @9000 */
+
s->rtc = time(NULL);
s->rtc_ref = 0;
@@ -333,8 +335,14 @@ DeviceState *lasi_init(MemoryRegion *address_space)
lasi_get_irq(LASI_UART_HPA));
serial_mm_init(address_space, LASI_UART_HPA + 0x800, 0,
serial_irq, 8000000 / 16,
- serial_hd(1), DEVICE_NATIVE_ENDIAN);
+ serial_hd(0), DEVICE_NATIVE_ENDIAN);
}
+
+ /* PS/2 Keyboard/Mouse */
+ qemu_irq ps2kbd_irq = qemu_allocate_irq(lasi_set_irq, s,
+ lasi_get_irq(LASI_PS2KBD_HPA));
+ lasips2_init(address_space, LASI_PS2KBD_HPA, ps2kbd_irq);
+
return dev;
}