hw/gpio: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3eadad551d
commit
b716368778
@ -677,7 +677,7 @@ static int omap_gpio_init(SysBusDevice *dev)
|
||||
qdev_init_gpio_in(&dev->qdev, omap_gpio_set, 16);
|
||||
qdev_init_gpio_out(&dev->qdev, s->omap1.handler, 16);
|
||||
sysbus_init_irq(dev, &s->omap1.irq);
|
||||
memory_region_init_io(&s->iomem, NULL, &omap_gpio_ops, &s->omap1,
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &omap_gpio_ops, &s->omap1,
|
||||
"omap.gpio", 0x1000);
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
return 0;
|
||||
@ -692,7 +692,7 @@ static int omap2_gpio_init(SysBusDevice *dev)
|
||||
}
|
||||
if (s->mpu_model < omap3430) {
|
||||
s->modulecount = (s->mpu_model < omap2430) ? 4 : 5;
|
||||
memory_region_init_io(&s->iomem, NULL, &omap2_gpif_top_ops, s,
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &omap2_gpif_top_ops, s,
|
||||
"omap2.gpio", 0x1000);
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
} else {
|
||||
@ -712,7 +712,7 @@ static int omap2_gpio_init(SysBusDevice *dev)
|
||||
sysbus_init_irq(dev, &m->irq[0]); /* mpu irq */
|
||||
sysbus_init_irq(dev, &m->irq[1]); /* dsp irq */
|
||||
sysbus_init_irq(dev, &m->wkup);
|
||||
memory_region_init_io(&m->iomem, NULL, &omap2_gpio_module_ops, m,
|
||||
memory_region_init_io(&m->iomem, OBJECT(s), &omap2_gpio_module_ops, m,
|
||||
"omap.gpio-module", 0x1000);
|
||||
sysbus_init_mmio(dev, &m->iomem);
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ static int pl061_init(SysBusDevice *dev, const unsigned char *id)
|
||||
{
|
||||
pl061_state *s = FROM_SYSBUS(pl061_state, dev);
|
||||
s->id = id;
|
||||
memory_region_init_io(&s->iomem, NULL, &pl061_ops, s, "pl061", 0x1000);
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &pl061_ops, s, "pl061", 0x1000);
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
sysbus_init_irq(dev, &s->irq);
|
||||
qdev_init_gpio_in(&dev->qdev, pl061_set_irq, 8);
|
||||
|
@ -112,7 +112,7 @@ static int puv3_gpio_init(SysBusDevice *dev)
|
||||
sysbus_init_irq(dev, &s->irq[PUV3_IRQS_GPIOLOW7]);
|
||||
sysbus_init_irq(dev, &s->irq[PUV3_IRQS_GPIOHIGH]);
|
||||
|
||||
memory_region_init_io(&s->iomem, NULL, &puv3_gpio_ops, s, "puv3_gpio",
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &puv3_gpio_ops, s, "puv3_gpio",
|
||||
PUV3_REGS_OFFSET);
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
|
||||
|
@ -169,7 +169,7 @@ static int scoop_init(SysBusDevice *dev)
|
||||
s->status = 0x02;
|
||||
qdev_init_gpio_out(&s->busdev.qdev, s->handler, 16);
|
||||
qdev_init_gpio_in(&s->busdev.qdev, scoop_gpio_set, 16);
|
||||
memory_region_init_io(&s->iomem, NULL, &scoop_ops, s, "scoop", 0x1000);
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &scoop_ops, s, "scoop", 0x1000);
|
||||
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user