summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-03-17 15:39:43 +0100
committerAndreas Färber <andreas.faerber@web.de>2012-04-28 20:51:54 +0200
commita527b5452eb6bb7ee00c940c450e592f0b448042 (patch)
treeb4af6e2d2a0b3515eabbbee644ffae9db7e31520
parentc9ae703dd16f7ada889e88127a5e60527a62a005 (diff)
downloadqemu-a527b5452eb6bb7ee00c940c450e592f0b448042.tar.gz
isa: Add isa_bus_from_device() method
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
-rw-r--r--hw/isa.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/isa.h b/hw/isa.h
index 40373fb107..f7bc4b5a95 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -76,6 +76,11 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
const MemoryRegionPortio *portio,
void *opaque, const char *name);
+static inline ISABus *isa_bus_from_device(ISADevice *d)
+{
+ return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
+}
+
extern target_phys_addr_t isa_mem_base;
void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);