diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-06-22 08:06:56 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:43 +0200 |
commit | 0c6c4e28b3e6a2d0d87b7ca87ffb19e03d44267b (patch) | |
tree | 4d0fba9e98b7935114d8a7723cc570a0b50eafff /hw | |
parent | e3914e3ad883cff0247da8471e9cb3051e88ab38 (diff) | |
download | qemu-0c6c4e28b3e6a2d0d87b7ca87ffb19e03d44267b.zip qemu-0c6c4e28b3e6a2d0d87b7ca87ffb19e03d44267b.tar.gz qemu-0c6c4e28b3e6a2d0d87b7ca87ffb19e03d44267b.tar.bz2 |
wdt_ib700: 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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/watchdog/wdt_ib700.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/watchdog/wdt_ib700.c b/hw/watchdog/wdt_ib700.c index d85c894..597a923 100644 --- a/hw/watchdog/wdt_ib700.c +++ b/hw/watchdog/wdt_ib700.c @@ -97,15 +97,23 @@ static const VMStateDescription vmstate_ib700 = { } }; +static const MemoryRegionPortio wdt_portio_list[] = { + { 0x441, 2, 1, .write = ib700_write_disable_reg, }, + { 0x443, 2, 1, .write = ib700_write_enable_reg, }, + PORTIO_END_OF_LIST(), +}; + static void wdt_ib700_realize(DeviceState *dev, Error **errp) { IB700State *s = IB700(dev); + PortioList *port_list = g_new(PortioList, 1); ib700_debug("watchdog init\n"); s->timer = qemu_new_timer_ns(vm_clock, ib700_timer_expired, s); - register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, s); - register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, s); + + portio_list_init(port_list, wdt_portio_list, s, "ib700"); + portio_list_add(port_list, isa_address_space_io(&s->parent_obj), 0); } static void wdt_ib700_reset(DeviceState *dev) |