From a89d01c1925e88e7f6432b334e0b681899454486 Mon Sep 17 00:00:00 2001 From: Guan Xuetao Date: Fri, 10 Aug 2012 14:42:30 +0800 Subject: unicore32-softmmu: Add puv3 gpio support This patch adds puv3 gpio (General Purpose Input/Output) support, include gpio device simulation and its interrupt support. v1->v2: Add initialization to ret in puv3_gpio_read. Signed-off-by: Guan Xuetao Signed-off-by: Blue Swirl --- hw/puv3.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/puv3.c') diff --git a/hw/puv3.c b/hw/puv3.c index 5a8a27c..0354cf6 100644 --- a/hw/puv3.c +++ b/hw/puv3.c @@ -49,6 +49,12 @@ static void puv3_soc_init(CPUUniCore32State *env) /* Initialize minimal necessary devices for kernel booting */ sysbus_create_simple("puv3_ost", PUV3_OST_BASE, irqs[PUV3_IRQS_OST0]); + sysbus_create_varargs("puv3_gpio", PUV3_GPIO_BASE, + irqs[PUV3_IRQS_GPIOLOW0], irqs[PUV3_IRQS_GPIOLOW1], + irqs[PUV3_IRQS_GPIOLOW2], irqs[PUV3_IRQS_GPIOLOW3], + irqs[PUV3_IRQS_GPIOLOW4], irqs[PUV3_IRQS_GPIOLOW5], + irqs[PUV3_IRQS_GPIOLOW6], irqs[PUV3_IRQS_GPIOLOW7], + irqs[PUV3_IRQS_GPIOHIGH], NULL); } static void puv3_board_init(CPUUniCore32State *env, ram_addr_t ram_size) -- cgit v1.1