[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/16] cpu/a15mpcore: Split off instance_init
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH v2 13/16] cpu/a15mpcore: Split off instance_init |
Date: |
Tue, 23 Jul 2013 04:43:21 +0200 |
From: Andreas Färber <address@hidden>
Prepares for QOM realize.
Signed-off-by: Andreas Färber <address@hidden>
---
hw/cpu/a15mpcore.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index 4f37964..c261cea 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -44,6 +44,15 @@ static void a15mp_priv_set_irq(void *opaque, int irq, int
level)
qemu_set_irq(qdev_get_gpio_in(s->gic, irq), level);
}
+static void a15mp_priv_initfn(Object *obj)
+{
+ SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
+ A15MPPrivState *s = A15MPCORE_PRIV(obj);
+
+ memory_region_init(&s->container, obj, "a15mp-priv-container", 0x8000);
+ sysbus_init_mmio(sbd, &s->container);
+}
+
static int a15mp_priv_init(SysBusDevice *dev)
{
A15MPPrivState *s = A15MPCORE_PRIV(dev);
@@ -75,14 +84,11 @@ static int a15mp_priv_init(SysBusDevice *dev)
* 0x5000-0x5fff -- GIC virtual interface control (not modelled)
* 0x6000-0x7fff -- GIC virtual CPU interface (not modelled)
*/
- memory_region_init(&s->container, OBJECT(s),
- "a15mp-priv-container", 0x8000);
memory_region_add_subregion(&s->container, 0x1000,
sysbus_mmio_get_region(busdev, 0));
memory_region_add_subregion(&s->container, 0x2000,
sysbus_mmio_get_region(busdev, 1));
- sysbus_init_mmio(dev, &s->container);
return 0;
}
@@ -111,6 +117,7 @@ static const TypeInfo a15mp_priv_info = {
.name = TYPE_A15MPCORE_PRIV,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(A15MPPrivState),
+ .instance_init = a15mp_priv_initfn,
.class_init = a15mp_priv_class_init,
};
--
1.8.1.4
- [Qemu-devel] [PATCH v2 04/16] cpu/a9mpcore: Embed GICState, (continued)
- [Qemu-devel] [PATCH v2 04/16] cpu/a9mpcore: Embed GICState, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 08/16] timer/arm_mptimer: Convert to QOM realize, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 05/16] misc/a9scu: QOM cleanups, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 07/16] timer/arm_mptimer: QOM cast cleanup, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 06/16] cpu/a9mpcore: Embed A9SCUState, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 03/16] intc/arm_gic: Extract public header hw/intc/arm_gic.h, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 11/16] cpu/a9mpcore: Prepare for QOM embedding, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 10/16] cpu/a9mpcore: Convert to QOM realize, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 12/16] cpu/a15mpcore: QOM cast cleanup, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 14/16] cpu/a15mpcore: Embed GICState, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 13/16] cpu/a15mpcore: Split off instance_init,
Andreas Färber <=
- [Qemu-devel] [PATCH v2 15/16] cpu/a15mpcore: Convert to QOM realize, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 09/16] cpu/a9mpcore: Embed ARMMPTimerState, Andreas Färber, 2013/07/22
- [Qemu-devel] [PATCH v2 16/16] cpu/a15mpcore: Prepare for QOM embedding, Andreas Färber, 2013/07/22
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Peter Maydell, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Peter Maydell, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Alexander Graf, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Peter Maydell, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Alexander Graf, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Andreas Färber, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 00/16] arm: A9MPCore+A15MPCore QOM'ification, Peter Maydell, 2013/07/23