@@ -173,6 +173,7 @@ static void mcf_intc_instance_init(Object *obj)
mcf_intc_state *s = MCF_INTC(obj);
memory_region_init_io(&s->iomem, obj, &mcf_intc_ops, s, "mcf", 0x100);
+ sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem);
}
static void mcf_intc_class_init(ObjectClass *oc, void *data)
@@ -211,7 +212,8 @@ qemu_irq *mcf_intc_init(MemoryRegion *sysmem,
s = MCF_INTC(dev);
s->cpu = cpu;
- memory_region_add_subregion(sysmem, base, &s->iomem);
+ memory_region_add_subregion(sysmem, base,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0));
return qemu_allocate_irqs(mcf_intc_set_irq, s, 64);
}