diff options
author | Avi Kivity <avi@redhat.com> | 2011-11-27 11:32:34 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-11-28 15:38:43 +0200 |
commit | 3f7f1c8067157e06fd468f09d050803c11d4ae53 (patch) | |
tree | ccaf4d0329cbe6a7d11bb6aaaa7ea75039ee05d6 | |
parent | 9a542a482160182cb56f3014ad929ee9079b1532 (diff) | |
download | qemu-3f7f1c8067157e06fd468f09d050803c11d4ae53.zip qemu-3f7f1c8067157e06fd468f09d050803c11d4ae53.tar.gz qemu-3f7f1c8067157e06fd468f09d050803c11d4ae53.tar.bz2 |
sysbus: remove sysbus_init_mmio()
No longer used - replaced by sysbus_init_mmio_region().
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | hw/sysbus.c | 27 | ||||
-rw-r--r-- | hw/sysbus.h | 4 |
2 files changed, 6 insertions, 25 deletions
diff --git a/hw/sysbus.c b/hw/sysbus.c index fd2fc6a..047a76f 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -55,9 +55,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr) dev->mmio[n].memory); } else if (dev->mmio[n].unmap) { dev->mmio[n].unmap(dev, dev->mmio[n].addr); - } else { - cpu_register_physical_memory(dev->mmio[n].addr, dev->mmio[n].size, - IO_MEM_UNASSIGNED); } } dev->mmio[n].addr = addr; @@ -67,9 +64,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr) dev->mmio[n].memory); } else if (dev->mmio[n].cb) { dev->mmio[n].cb(dev, addr); - } else { - cpu_register_physical_memory(addr, dev->mmio[n].size, - dev->mmio[n].iofunc); } } @@ -95,18 +89,6 @@ void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target) } } -void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, - ram_addr_t iofunc) -{ - int n; - - assert(dev->num_mmio < QDEV_MAX_MMIO); - n = dev->num_mmio++; - dev->mmio[n].addr = -1; - dev->mmio[n].size = size; - dev->mmio[n].iofunc = iofunc; -} - void sysbus_init_mmio_cb2(SysBusDevice *dev, mmio_mapfunc cb, mmio_mapfunc unmap) { @@ -115,7 +97,6 @@ void sysbus_init_mmio_cb2(SysBusDevice *dev, assert(dev->num_mmio < QDEV_MAX_MMIO); n = dev->num_mmio++; dev->mmio[n].addr = -1; - dev->mmio[n].size = 0; dev->mmio[n].cb = cb; dev->mmio[n].unmap = unmap; } @@ -127,7 +108,6 @@ void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory) assert(dev->num_mmio < QDEV_MAX_MMIO); n = dev->num_mmio++; dev->mmio[n].addr = -1; - dev->mmio[n].size = memory_region_size(memory); dev->mmio[n].memory = memory; } @@ -237,12 +217,17 @@ DeviceState *sysbus_try_create_varargs(const char *name, static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent) { SysBusDevice *s = sysbus_from_qdev(dev); + target_phys_addr_t size; int i; monitor_printf(mon, "%*sirq %d\n", indent, "", s->num_irq); for (i = 0; i < s->num_mmio; i++) { + size = 0; + if (s->mmio[i].memory) { + size = memory_region_size(s->mmio[i].memory); + } monitor_printf(mon, "%*smmio " TARGET_FMT_plx "/" TARGET_FMT_plx "\n", - indent, "", s->mmio[i].addr, s->mmio[i].size); + indent, "", s->mmio[i].addr, size); } } diff --git a/hw/sysbus.h b/hw/sysbus.h index 6c36537..e3b4c91 100644 --- a/hw/sysbus.h +++ b/hw/sysbus.h @@ -21,10 +21,8 @@ struct SysBusDevice { int num_mmio; struct { target_phys_addr_t addr; - target_phys_addr_t size; mmio_mapfunc cb; mmio_mapfunc unmap; - ram_addr_t iofunc; MemoryRegion *memory; } mmio[QDEV_MAX_MMIO]; int num_pio; @@ -45,8 +43,6 @@ typedef struct { void sysbus_register_dev(const char *name, size_t size, sysbus_initfn init); void sysbus_register_withprop(SysBusDeviceInfo *info); void *sysbus_new(void); -void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, - ram_addr_t iofunc); void sysbus_init_mmio_cb2(SysBusDevice *dev, mmio_mapfunc cb, mmio_mapfunc unmap); void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory); |