diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-08-24 21:55:28 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-08-24 21:55:28 +0000 |
commit | 60e336dbb837ef4d5053433f9ee391feb102be36 (patch) | |
tree | 7bdbcd277b6e462626589a9c00a7241c1b0b87bd /hw/serial.c | |
parent | 8d11df9e5aa58497e27e3481cca119809c76afc6 (diff) | |
download | hqemu-60e336dbb837ef4d5053433f9ee391feb102be36.zip hqemu-60e336dbb837ef4d5053433f9ee391feb102be36.tar.gz |
serial interrupt fix (Hampa Hug)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1049 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/serial.c')
-rw-r--r-- | hw/serial.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/serial.c b/hw/serial.c index 0fc1ccb..3fe482c 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -133,7 +133,10 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val) if (s->lcr & UART_LCR_DLAB) { s->divider = (s->divider & 0x00ff) | (val << 8); } else { - s->ier = val; + s->ier = val & 0x0f; + if (s->lsr & UART_LSR_THRE) { + s->thr_ipending = 1; + } serial_update_irq(s); } break; @@ -143,7 +146,7 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val) s->lcr = val; break; case 4: - s->mcr = val; + s->mcr = val & 0x1f; break; case 5: break; |