From 7a3161bafbda89f08701601a7b6d27329548ce62 Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Tue, 5 May 2009 12:25:35 +0200 Subject: ETRAX: Simplify interrupt signaling. Signed-off-by: Edgar E. Iglesias --- hw/etraxfs_ser.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'hw/etraxfs_ser.c') diff --git a/hw/etraxfs_ser.c b/hw/etraxfs_ser.c index 8367386..ab104ba 100644 --- a/hw/etraxfs_ser.c +++ b/hw/etraxfs_ser.c @@ -67,24 +67,16 @@ struct etrax_serial_t static void ser_update_irq(struct etrax_serial_t *s) { - uint32_t o_irq = s->r_masked_intr; - s->r_intr &= ~(s->rw_ack_intr); s->r_masked_intr = s->r_intr & s->rw_intr_mask; - if (o_irq != s->r_masked_intr) { - D(printf("irq_mask=%x r_intr=%x rmi=%x airq=%x \n", - s->rw_intr_mask, s->r_intr, - s->r_masked_intr, s->rw_ack_intr)); - if (s->r_masked_intr) - qemu_irq_raise(s->irq[0]); - else - qemu_irq_lower(s->irq[0]); - } + D(printf("irq_mask=%x r_intr=%x rmi=%x airq=%x \n", + s->rw_intr_mask, s->r_intr, + s->r_masked_intr, s->rw_ack_intr)); + qemu_set_irq(s->irq[0], !!s->r_masked_intr); s->rw_ack_intr = 0; } - static uint32_t ser_readb (void *opaque, target_phys_addr_t addr) { D(CPUState *env = opaque); -- cgit v1.1