diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-12 20:42:42 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-12 20:42:42 +0000 |
commit | 3e749fe1f75f4b84ee6d8141b65acde9215484b7 (patch) | |
tree | e0ff1a095dc33d8f58a9e4eac9f4639f57aae736 /hw/serial.c | |
parent | f331110f3539ee590b3a856d157f92fb34a88bce (diff) |
simulate a null modem cable
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1808 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/serial.c')
-rw-r--r-- | hw/serial.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/serial.c b/hw/serial.c index 254434e662..f36beb209f 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -78,7 +78,7 @@ struct SerialState { uint8_t lcr; uint8_t mcr; uint8_t lsr; /* read only */ - uint8_t msr; + uint8_t msr; /* read only */ uint8_t scr; /* NOTE: this hidden state is necessary for tx irq generation as it can be reset while reading iir */ @@ -200,7 +200,6 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val) case 5: break; case 6: - s->msr = val; break; case 7: s->scr = val; @@ -356,6 +355,7 @@ SerialState *serial_init(SetIRQFunc *set_irq, void *opaque, s->irq = irq; s->lsr = UART_LSR_TEMT | UART_LSR_THRE; s->iir = UART_IIR_NO_INT; + s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; register_savevm("serial", base, 1, serial_save, serial_load, s); @@ -440,6 +440,7 @@ SerialState *serial_mm_init (SetIRQFunc *set_irq, void *opaque, s->irq = irq; s->lsr = UART_LSR_TEMT | UART_LSR_THRE; s->iir = UART_IIR_NO_INT; + s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; s->base = base; s->it_shift = it_shift; |