]> git.proxmox.com Git - mirror_qemu.git/commit - hw/arm/musicpal.c
musicpal: Rework GPIO input events
authorJan Kiszka <jan.kiszka@web.de>
Fri, 18 Sep 2009 18:51:23 +0000 (20:51 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:43 +0000 (09:32 -0500)
commit708afdf3a4f626a69f3fad5c31e61fbc297157b5
tree9de4e055665177dc4a46a4673a403ee925cd73e8
parent2e87c5b937444c1155073f7b10d630e0e383e5d8
musicpal: Rework GPIO input events

The qdev_gpio conversion of 343ec8e caused come polarity mismatch of key
event pins and left an overly complex solution behind. Take this chance
and refactor the GPIO input system of the Musicpal, moving it closer to
reality:
 - Instantiate all 32 GPIO input pins and do the routing only via
   qdev_connect_gpio_out.
 - Implement IMR and IER registers. They manage the GPIO pin IRQ. IMR
   seems to enable IRQs on rising edges, IER on falling ones. At least
   this matches what the Musicpal fireware require.
 - Move key pin logic inversion from the GPIO layer to musicpal_key.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/musicpal.c