hw/intc: QOM'ify exynos4210_combiner.c
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b46818e9e7
commit
d3d5a6febd
@ -406,10 +406,11 @@ static const MemoryRegionOps exynos4210_combiner_ops = {
|
||||
/*
|
||||
* Internal Combiner initialization.
|
||||
*/
|
||||
static int exynos4210_combiner_init(SysBusDevice *sbd)
|
||||
static void exynos4210_combiner_init(Object *obj)
|
||||
{
|
||||
DeviceState *dev = DEVICE(sbd);
|
||||
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);
|
||||
DeviceState *dev = DEVICE(obj);
|
||||
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(obj);
|
||||
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
||||
unsigned int i;
|
||||
|
||||
/* Allocate general purpose input signals and connect a handler to each of
|
||||
@ -421,11 +422,9 @@ static int exynos4210_combiner_init(SysBusDevice *sbd)
|
||||
sysbus_init_irq(sbd, &s->output_irq[i]);
|
||||
}
|
||||
|
||||
memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_combiner_ops, s,
|
||||
memory_region_init_io(&s->iomem, obj, &exynos4210_combiner_ops, s,
|
||||
"exynos4210-combiner", IIC_REGION_SIZE);
|
||||
sysbus_init_mmio(sbd, &s->iomem);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Property exynos4210_combiner_properties[] = {
|
||||
@ -436,9 +435,7 @@ static Property exynos4210_combiner_properties[] = {
|
||||
static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
||||
|
||||
k->init = exynos4210_combiner_init;
|
||||
dc->reset = exynos4210_combiner_reset;
|
||||
dc->props = exynos4210_combiner_properties;
|
||||
dc->vmsd = &vmstate_exynos4210_combiner;
|
||||
@ -448,6 +445,7 @@ static const TypeInfo exynos4210_combiner_info = {
|
||||
.name = TYPE_EXYNOS4210_COMBINER,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(Exynos4210CombinerState),
|
||||
.instance_init = exynos4210_combiner_init,
|
||||
.class_init = exynos4210_combiner_class_init,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user