openpic: fix CTPR and de-assertion of interrupts
authorScott Wood <scottwood@freescale.com>
Thu, 3 Jan 2013 13:25:40 +0000 (13:25 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 7 Jan 2013 16:37:11 +0000 (17:37 +0100)
commit9f1d4b1d6939d39fe570d886f6a651f4764bcbcb
tree1948664625070d3346fa9b61459edcc8bf0a1920
parenta898a8fc96a071189206218b39b5db99531f5c8b
openpic: fix CTPR and de-assertion of interrupts

Properly implement level-triggered interrupts by withdrawing an
interrupt from the raised queue if the interrupt source de-asserts.
Also withdraw from the raised queue if the interrupt becomes masked.

When CTPR is written, check whether we need to raise or lower the
interrupt output.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/openpic.c