aboutsummaryrefslogtreecommitdiff
path: root/hw/puv3.c
diff options
context:
space:
mode:
authorGuan Xuetao <gxt@mprc.pku.edu.cn>2012-08-10 14:42:30 +0800
committerBlue Swirl <blauwirbel@gmail.com>2012-08-11 09:37:00 +0000
commita89d01c1925e88e7f6432b334e0b681899454486 (patch)
tree0da4df9d067e020a14c87d08849ac6d685f728e7 /hw/puv3.c
parent56d07a905025c18a14fef8f85c427e078a7cea79 (diff)
downloadqemu-a89d01c1925e88e7f6432b334e0b681899454486.zip
qemu-a89d01c1925e88e7f6432b334e0b681899454486.tar.gz
qemu-a89d01c1925e88e7f6432b334e0b681899454486.tar.bz2
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 <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/puv3.c')
-rw-r--r--hw/puv3.c6
1 files changed, 6 insertions, 0 deletions
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)