diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-01-27 23:46:43 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-01-27 23:46:43 +0000 |
commit | e5b0bc445ed7edb1738aabb982a387ee38da1655 (patch) | |
tree | 1e16d2ed3df380c3cc664d4a5071d5695ad993f6 /hw | |
parent | dff5efc848f5fe3fd8a9a67129a5234fe46ec3bb (diff) |
Rearrange char event handlers to fix CHR_EVENT_RESET.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2361 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pl011.c | 4 | ||||
-rw-r--r-- | hw/serial.c | 8 | ||||
-rw-r--r-- | hw/sh7750.c | 10 | ||||
-rw-r--r-- | hw/slavio_serial.c | 4 |
4 files changed, 12 insertions, 14 deletions
diff --git a/hw/pl011.c b/hw/pl011.c index 657f03bbe8..fb7ab7b53d 100644 --- a/hw/pl011.c +++ b/hw/pl011.c @@ -243,8 +243,8 @@ void pl011_init(uint32_t base, void *pic, int irq, s->cr = 0x300; s->flags = 0x90; if (chr){ - qemu_chr_add_read_handler(chr, pl011_can_recieve, pl011_recieve, s); - qemu_chr_add_event_handler(chr, pl011_event); + qemu_chr_add_handlers(chr, pl011_can_recieve, pl011_recieve, + pl011_event, s); } /* ??? Save/restore. */ } diff --git a/hw/serial.c b/hw/serial.c index 16dbc65c37..a88aec17d1 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -365,8 +365,8 @@ SerialState *serial_init(SetIRQFunc *set_irq, void *opaque, register_ioport_write(base, 8, 1, serial_ioport_write, s); register_ioport_read(base, 8, 1, serial_ioport_read, s); s->chr = chr; - qemu_chr_add_read_handler(chr, serial_can_receive1, serial_receive1, s); - qemu_chr_add_event_handler(chr, serial_event); + qemu_chr_add_handlers(chr, serial_can_receive1, serial_receive1, + serial_event, s); return s; } @@ -453,7 +453,7 @@ SerialState *serial_mm_init (SetIRQFunc *set_irq, void *opaque, serial_mm_write, s); cpu_register_physical_memory(base, 8 << it_shift, s_io_memory); s->chr = chr; - qemu_chr_add_read_handler(chr, serial_can_receive1, serial_receive1, s); - qemu_chr_add_event_handler(chr, serial_event); + qemu_chr_add_handlers(chr, serial_can_receive1, serial_receive1, + serial_event, s); return s; } diff --git a/hw/sh7750.c b/hw/sh7750.c index 21f9bc0aee..164ce71623 100644 --- a/hw/sh7750.c +++ b/hw/sh7750.c @@ -299,9 +299,8 @@ static void init_serial1(SH7750State * s, int serial_nb) } s->serial1 = chr; - qemu_chr_add_read_handler(chr, serial1_can_receive, - serial1_receive, s); - qemu_chr_add_event_handler(chr, serial1_event); + qemu_chr_add_handlers(chr, serial1_can_receive, + serial1_receive, serial1_event, s); } /********************************************************************** @@ -415,9 +414,8 @@ static void init_serial2(SH7750State * s, int serial_nb) } s->serial2 = chr; - qemu_chr_add_read_handler(chr, serial2_can_receive, - serial2_receive, s); - qemu_chr_add_event_handler(chr, serial2_event); + qemu_chr_add_handlers(chr, serial2_can_receive, + serial2_receive, serial1_event, s); } static void init_serial_ports(SH7750State * s) diff --git a/hw/slavio_serial.c b/hw/slavio_serial.c index 928ff4c917..e72bb70e05 100644 --- a/hw/slavio_serial.c +++ b/hw/slavio_serial.c @@ -565,8 +565,8 @@ SerialState *slavio_serial_init(int base, int irq, CharDriverState *chr1, CharDr s->chn[i].chn = 1 - i; s->chn[i].type = ser; if (s->chn[i].chr) { - qemu_chr_add_read_handler(s->chn[i].chr, serial_can_receive, serial_receive1, &s->chn[i]); - qemu_chr_add_event_handler(s->chn[i].chr, serial_event); + qemu_chr_add_handlers(s->chn[i].chr, serial_can_receive, + serial_receive1, serial_event, &s->chn[i]); } } s->chn[0].otherchn = &s->chn[1]; |