提交 ab0115e1 编写于 作者: B Benoît Canet 提交者: Anthony Liguori

sysbus: remove sysbus_init_mmio_cb2

This function is not longer in use so remove it.
Signed-off-by: NBenoît Canet <benoit.canet@gmail.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 cb4e15c7
......@@ -53,8 +53,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr)
if (dev->mmio[n].memory) {
memory_region_del_subregion(get_system_memory(),
dev->mmio[n].memory);
} else if (dev->mmio[n].unmap) {
dev->mmio[n].unmap(dev, dev->mmio[n].addr);
}
}
dev->mmio[n].addr = addr;
......@@ -62,8 +60,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr)
memory_region_add_subregion(get_system_memory(),
addr,
dev->mmio[n].memory);
} else if (dev->mmio[n].cb) {
dev->mmio[n].cb(dev, addr);
}
}
......@@ -89,18 +85,6 @@ void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target)
}
}
void sysbus_init_mmio_cb2(SysBusDevice *dev,
mmio_mapfunc cb, mmio_mapfunc unmap)
{
int n;
assert(dev->num_mmio < QDEV_MAX_MMIO);
n = dev->num_mmio++;
dev->mmio[n].addr = -1;
dev->mmio[n].cb = cb;
dev->mmio[n].unmap = unmap;
}
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory)
{
int n;
......
......@@ -11,7 +11,6 @@
#define QDEV_MAX_IRQ 256
typedef struct SysBusDevice SysBusDevice;
typedef void (*mmio_mapfunc)(SysBusDevice *dev, target_phys_addr_t addr);
struct SysBusDevice {
DeviceState qdev;
......@@ -21,8 +20,6 @@ struct SysBusDevice {
int num_mmio;
struct {
target_phys_addr_t addr;
mmio_mapfunc cb;
mmio_mapfunc unmap;
MemoryRegion *memory;
} mmio[QDEV_MAX_MMIO];
int num_pio;
......@@ -43,8 +40,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_cb2(SysBusDevice *dev,
mmio_mapfunc cb, mmio_mapfunc unmap);
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory);
MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n);
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册