diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2011-08-28 16:22:17 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2011-08-28 16:22:17 +0000 |
| commit | 46c305ef6b0d1ed6c85e863568fccc03caf7f75e (patch) | |
| tree | a4fc37959569c26e6e1f86d61b332813801d1033 /hw/sysbus.h | |
| parent | 9f94778c1603420e48d779a495e84eb82945cc75 (diff) | |
| download | focaccia-qemu-46c305ef6b0d1ed6c85e863568fccc03caf7f75e.tar.gz focaccia-qemu-46c305ef6b0d1ed6c85e863568fccc03caf7f75e.zip | |
hw/sysbus: Add sysbus_mmio_get_region()
Add a sysbus_mmio_get_region() which allows users of sysbus devices to turn a (SysBusDevice*, mmioidx) tuple into a MemoryRegion*. This enables some useful simplifications of devices which pass through another device's mmio region (either directly or by implementing some kind of memory controller device). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/sysbus.h')
| -rw-r--r-- | hw/sysbus.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/sysbus.h b/hw/sysbus.h index b87c6c5aab..aa3d383277 100644 --- a/hw/sysbus.h +++ b/hw/sysbus.h @@ -50,6 +50,7 @@ void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, void sysbus_init_mmio_cb2(SysBusDevice *dev, mmio_mapfunc cb, mmio_mapfunc unmap); void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory); +MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n); void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p); void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target); void sysbus_init_ioports(SysBusDevice *dev, pio_addr_t ioport, pio_addr_t size); |