diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-06-22 08:06:57 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:43 +0200 |
commit | f94b64acb6ec2871676990ea5ba956a91b20cc75 (patch) | |
tree | ad3d7270a49dfc8931f24d739b810bb6f491f569 | |
parent | 0c6c4e28b3e6a2d0d87b7ca87ffb19e03d44267b (diff) | |
download | qemu-f94b64acb6ec2871676990ea5ba956a91b20cc75.zip qemu-f94b64acb6ec2871676990ea5ba956a91b20cc75.tar.gz qemu-f94b64acb6ec2871676990ea5ba956a91b20cc75.tar.bz2 |
i82374: replace register_ioport*
Convert over to memory regions to obsolete register_ioport*.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/dma/i82374.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 6192780..ecda5cb 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -124,16 +124,24 @@ static const VMStateDescription vmstate_isa_i82374 = { }, }; +static const MemoryRegionPortio i82374_portio_list[] = { + { 0x0A, 1, 1, .read = i82374_read_isr, }, + { 0x10, 8, 1, .write = i82374_write_command, }, + { 0x18, 8, 1, .read = i82374_read_status, }, + { 0x20, 0x20, 1, + .write = i82374_write_descriptor, .read = i82374_read_descriptor, }, + PORTIO_END_OF_LIST(), +}; + static void i82374_isa_realize(DeviceState *dev, Error **errp) { ISAi82374State *isa = I82374(dev); I82374State *s = &isa->state; + PortioList *port_list = g_new(PortioList, 1); - register_ioport_read(isa->iobase + 0x0A, 1, 1, i82374_read_isr, s); - register_ioport_write(isa->iobase + 0x10, 8, 1, i82374_write_command, s); - register_ioport_read(isa->iobase + 0x18, 8, 1, i82374_read_status, s); - register_ioport_write(isa->iobase + 0x20, 0x20, 1, i82374_write_descriptor, s); - register_ioport_read(isa->iobase + 0x20, 0x20, 1, i82374_read_descriptor, s); + portio_list_init(port_list, i82374_portio_list, s, "i82374"); + portio_list_add(port_list, isa_address_space_io(&isa->parent_obj), + isa->iobase); i82374_realize(s, errp); |