提交 79683f61 编写于 作者: G Guan Xuetao 提交者: Blue Swirl

unicore32-softmmu: Add ps2 support

This patch adds ps2/keyboard support, and enables CONFIG_PCKBD.
Signed-off-by: NGuan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 1ea34899
# Default configuration for unicore32-softmmu # Default configuration for unicore32-softmmu
CONFIG_PUV3=y CONFIG_PUV3=y
CONFIG_PTIMER=y CONFIG_PTIMER=y
CONFIG_PCKBD=y
...@@ -38,6 +38,7 @@ static void puv3_soc_init(CPUUniCore32State *env) ...@@ -38,6 +38,7 @@ static void puv3_soc_init(CPUUniCore32State *env)
{ {
qemu_irq *cpu_intc, irqs[PUV3_IRQS_NR]; qemu_irq *cpu_intc, irqs[PUV3_IRQS_NR];
DeviceState *dev; DeviceState *dev;
MemoryRegion *i8042 = g_new(MemoryRegion, 1);
int i; int i;
/* Initialize interrupt controller */ /* Initialize interrupt controller */
...@@ -57,6 +58,10 @@ static void puv3_soc_init(CPUUniCore32State *env) ...@@ -57,6 +58,10 @@ static void puv3_soc_init(CPUUniCore32State *env)
irqs[PUV3_IRQS_GPIOLOW4], irqs[PUV3_IRQS_GPIOLOW5], irqs[PUV3_IRQS_GPIOLOW4], irqs[PUV3_IRQS_GPIOLOW5],
irqs[PUV3_IRQS_GPIOLOW6], irqs[PUV3_IRQS_GPIOLOW7], irqs[PUV3_IRQS_GPIOLOW6], irqs[PUV3_IRQS_GPIOLOW7],
irqs[PUV3_IRQS_GPIOHIGH], NULL); 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) static void puv3_board_init(CPUUniCore32State *env, ram_addr_t ram_size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册