From 3efda49d150def64f69a79cbd8da760ea15a79b7 Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 29 Oct 2007 10:34:01 +0000 Subject: Add a TI TSC2102 chip (touchscreen/ADC/audio-CODEC controller). Fix GPIO memory mapping address and register width. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3484 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/palm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'hw/palm.c') diff --git a/hw/palm.c b/hw/palm.c index 794574565f..0966413749 100644 --- a/hw/palm.c +++ b/hw/palm.c @@ -76,8 +76,21 @@ static CPUWriteMemoryFunc *static_writefn[] = { #define PALMTE_MMC2_GPIO 7 #define PALMTE_MMC3_GPIO 11 +static void palmte_pintdav(void *opaque, int line, int level) +{ + struct omap_mpu_state_s *cpu = (struct omap_mpu_state_s *) opaque; + + qemu_set_irq(omap_gpio_in_get(cpu->gpio)[PALMTE_PINTDAV_GPIO], + !level); +} + static void palmte_microwire_setup(struct omap_mpu_state_s *cpu) { + omap_uwire_attach( + cpu->microwire, + tsc2102_init( + qemu_allocate_irqs(palmte_pintdav, cpu, 1)[0]), + 0); } static struct { -- cgit v1.2.3