aboutsummaryrefslogtreecommitdiff
path: root/hw/serial.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-10 23:58:33 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-10 23:58:33 +0000
commit2122c51a9c9d5935773d3a542248bd8f369b172c (patch)
treeb63f7f44c0aa7855d89ccbc1678bbe6a1c33db55 /hw/serial.c
parentf8d179e33d71ddac580fb41f2b452099e7805d67 (diff)
char dev ioctls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1610 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/serial.c')
-rw-r--r--hw/serial.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/serial.c b/hw/serial.c
index 75be4de12e..0250d77fb4 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -107,6 +107,7 @@ static void serial_update_irq(SerialState *s)
static void serial_update_parameters(SerialState *s)
{
int speed, parity, data_bits, stop_bits;
+ QEMUSerialSetParams ssp;
if (s->lcr & 0x08) {
if (s->lcr & 0x10)
@@ -124,7 +125,12 @@ static void serial_update_parameters(SerialState *s)
if (s->divider == 0)
return;
speed = 115200 / s->divider;
-#if 0
+ ssp.speed = speed;
+ ssp.parity = parity;
+ ssp.data_bits = data_bits;
+ ssp.stop_bits = stop_bits;
+ qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp);
+#if 0
printf("speed=%d parity=%c data=%d stop=%d\n",
speed, parity, data_bits, stop_bits);
#endif
@@ -179,7 +185,8 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val)
break_enable = (val >> 6) & 1;
if (break_enable != s->last_break_enable) {
s->last_break_enable = break_enable;
- qemu_chr_set_serial_break(s, break_enable);
+ qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_BREAK,
+ &break_enable);
}
}
break;