mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
hw/arm11mpcore: Clean up to avoid using sysbus_mmio_init_cb2
Clean up the initialisation of the realview_mpcore device to avoid using sysbus_init_mmio_cb2(): we can pass through the MemoryRegion of the private arm11mpcore_priv device directly now. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
a682fd5c29
commit
dd236a50aa
@ -48,17 +48,6 @@ static void mpcore_rirq_set_irq(void *opaque, int irq, int level)
|
||||
}
|
||||
}
|
||||
|
||||
static void mpcore_rirq_map(SysBusDevice *dev, target_phys_addr_t base)
|
||||
{
|
||||
mpcore_rirq_state *s = FROM_SYSBUS(mpcore_rirq_state, dev);
|
||||
sysbus_mmio_map(s->priv, 0, base);
|
||||
}
|
||||
|
||||
static void mpcore_rirq_unmap(SysBusDevice *dev, target_phys_addr_t base)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
static int realview_mpcore_init(SysBusDevice *dev)
|
||||
{
|
||||
mpcore_rirq_state *s = FROM_SYSBUS(mpcore_rirq_state, dev);
|
||||
@ -84,7 +73,7 @@ static int realview_mpcore_init(SysBusDevice *dev)
|
||||
}
|
||||
}
|
||||
qdev_init_gpio_in(&dev->qdev, mpcore_rirq_set_irq, 64);
|
||||
sysbus_init_mmio_cb2(dev, mpcore_rirq_map, mpcore_rirq_unmap);
|
||||
sysbus_init_mmio_region(dev, sysbus_mmio_get_region(s->priv, 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user