diff options
author | Avi Kivity <avi@redhat.com> | 2011-09-26 14:52:44 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-11 15:57:09 +0200 |
commit | d750073472151f72907ec0c9b55a6506a19863a9 (patch) | |
tree | 273efed52a93d2a6877e9a7f6b7f4fcf615543a7 /hw/isa-bus.c | |
parent | 03808f58e4399a7e1c85bd4ea535fafdf592246c (diff) | |
download | hqemu-d750073472151f72907ec0c9b55a6506a19863a9.zip hqemu-d750073472151f72907ec0c9b55a6506a19863a9.tar.gz |
isa: Add isa_register_portio_list()
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r-- | hw/isa-bus.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c index e9c1712..5d8ff84 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -103,6 +103,23 @@ void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start) } } +void isa_register_portio_list(ISADevice *dev, uint16_t start, + const MemoryRegionPortio *pio_start, + void *opaque, const char *name) +{ + PortioList *piolist = g_new(PortioList, 1); + + /* START is how we should treat DEV, regardless of the actual + contents of the portio array. This is how the old code + actually handled e.g. the FDC device. */ + if (dev) { + isa_init_ioport(dev, start); + } + + portio_list_init(piolist, pio_start, opaque, name); + portio_list_add(piolist, isabus->address_space_io, start); +} + static int isa_qdev_init(DeviceState *qdev, DeviceInfo *base) { ISADevice *dev = DO_UPCAST(ISADevice, qdev, qdev); |