aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-08-16 09:02:36 -0700
committerAvi Kivity <avi@redhat.com>2011-10-11 15:57:11 +0200
commit0d9595245393f6e59831447a06235a0a1b2cdfd4 (patch)
treea7c4e606656b4b9466d0dd8c9bb5e40a5e547dbc /hw
parent4a91d3b33784e7a1c12a50fe5e35699c6656ead6 (diff)
downloadqemu-0d9595245393f6e59831447a06235a0a1b2cdfd4.zip
qemu-0d9595245393f6e59831447a06235a0a1b2cdfd4.tar.gz
qemu-0d9595245393f6e59831447a06235a0a1b2cdfd4.tar.bz2
isa: Remove isa_init_ioport_range and isa_init_ioport
All users have been converted to either isa_register_ioport or isa_register_old_portio_list. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/isa-bus.c19
-rw-r--r--hw/isa.h2
2 files changed, 5 insertions, 16 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 5d8ff84..7c2c261 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -83,24 +83,17 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq)
dev->nirqs++;
}
-void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length)
+static inline void isa_init_ioport(ISADevice *dev, uint16_t ioport)
{
- if (dev->ioport_id == 0 || start < dev->ioport_id) {
- dev->ioport_id = start;
+ if (dev && (dev->ioport_id == 0 || ioport < dev->ioport_id)) {
+ dev->ioport_id = ioport;
}
}
-void isa_init_ioport(ISADevice *dev, uint16_t ioport)
-{
- isa_init_ioport_range(dev, ioport, 1);
-}
-
void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start)
{
memory_region_add_subregion(isabus->address_space_io, start, io);
- if (dev != NULL) {
- isa_init_ioport(dev, start);
- }
+ isa_init_ioport(dev, start);
}
void isa_register_portio_list(ISADevice *dev, uint16_t start,
@@ -112,9 +105,7 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
/* 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);
- }
+ isa_init_ioport(dev, start);
portio_list_init(piolist, pio_start, opaque, name);
portio_list_add(piolist, isabus->address_space_io, start);
diff --git a/hw/isa.h b/hw/isa.h
index 177ef95..d3cae35 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -28,8 +28,6 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space_io);
void isa_bus_irqs(qemu_irq *irqs);
qemu_irq isa_get_irq(int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
-void isa_init_ioport(ISADevice *dev, uint16_t ioport);
-void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
void isa_qdev_register(ISADeviceInfo *info);
MemoryRegion *isa_address_space(ISADevice *dev);
ISADevice *isa_create(const char *name);