aboutsummaryrefslogtreecommitdiff
path: root/hw/puv3.c
diff options
context:
space:
mode:
authorGuan Xuetao <gxt@mprc.pku.edu.cn>2012-08-10 14:42:33 +0800
committerBlue Swirl <blauwirbel@gmail.com>2012-08-11 09:37:02 +0000
commit79683f6117ca3fc24563743679a9786a8b83fb9d (patch)
treec4180e3c1b3e6e99cd6b1f4e193cf08f8efeed67 /hw/puv3.c
parent1ea3489963a9eb20f3c2312224e2638b79256f84 (diff)
downloadqemu-79683f6117ca3fc24563743679a9786a8b83fb9d.zip
qemu-79683f6117ca3fc24563743679a9786a8b83fb9d.tar.gz
qemu-79683f6117ca3fc24563743679a9786a8b83fb9d.tar.bz2
unicore32-softmmu: Add ps2 support
This patch adds ps2/keyboard support, and enables CONFIG_PCKBD. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/puv3.c')
-rw-r--r--hw/puv3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/puv3.c b/hw/puv3.c
index 9acfc5a..271df97 100644
--- a/hw/puv3.c
+++ b/hw/puv3.c
@@ -38,6 +38,7 @@ static void puv3_soc_init(CPUUniCore32State *env)
{
qemu_irq *cpu_intc, irqs[PUV3_IRQS_NR];
DeviceState *dev;
+ MemoryRegion *i8042 = g_new(MemoryRegion, 1);
int i;
/* Initialize interrupt controller */
@@ -57,6 +58,10 @@ static void puv3_soc_init(CPUUniCore32State *env)
irqs[PUV3_IRQS_GPIOLOW4], irqs[PUV3_IRQS_GPIOLOW5],
irqs[PUV3_IRQS_GPIOLOW6], irqs[PUV3_IRQS_GPIOLOW7],
irqs[PUV3_IRQS_GPIOHIGH], NULL);
+
+ /* Keyboard (i8042), mouse disabled for nographic */
+ i8042_mm_init(irqs[PUV3_IRQS_PS2_KBD], NULL, i8042, PUV3_REGS_OFFSET, 4);
+ memory_region_add_subregion(get_system_memory(), PUV3_PS2_BASE, i8042);
}
static void puv3_board_init(CPUUniCore32State *env, ram_addr_t ram_size)