diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-21 21:06:51 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-21 21:06:51 +0000 |
commit | 4e7ed2d1d396feac872c727a0700fdb5a86641e2 (patch) | |
tree | ab22dca8472cd9b31521d801ce8fdab23c44dfb5 /hw/sh_intc.c | |
parent | 96e2fc41a94f190994dfb56d47d609a658bfe67c (diff) |
SH4: Switch serial emulation to qemu_irq
This patches makes SH serial emulation use qemu_irq in its interface.
* hw/sh.h (sh_serial_init): Take qemu_irq, not intc_source.
* hw/sh7750.c (sh7750_init): Adjust.
* hw/sh_intc.c (sh_intc_set_irq): Don't assert or deassert
irq more than once.
* hw/sh_serial.c (sh_serial_state): Use qemu_irq, not intc_source.
(sh_serial_clear_fifo, sh_serial_ioport_write)
(sh_serial_receive_byte): Adjust.
(sh_serial_init): Take qemu_irq, not intc_source.
(Vladimir Prus)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5769 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sh_intc.c')
-rw-r--r-- | hw/sh_intc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/sh_intc.c b/hw/sh_intc.c index 3c6809ac5f..a78419bede 100644 --- a/hw/sh_intc.c +++ b/hw/sh_intc.c @@ -78,7 +78,10 @@ void sh_intc_set_irq (void *opaque, int n, int level) struct intc_desc *desc = opaque; struct intc_source *source = &(desc->sources[n]); - sh_intc_toggle_source(source, 0, level ? 1 : -1); + if (level && !source->asserted) + sh_intc_toggle_source(source, 0, 1); + else if (!level && source->asserted) + sh_intc_toggle_source(source, 0, -1); } int sh_intc_get_pending_vector(struct intc_desc *desc, int imask) |