aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Bellows <greg.bellows@linaro.org>2014-11-21 13:43:10 -0600
committerGreg Bellows <greg.bellows@linaro.org>2014-12-12 14:08:24 -0600
commitcfce8c3d4a218234144f24866f5a5e06f62a17ae (patch)
treeeca4079edcb8800f533e042de4dc96278315c4b3
parenta39d0f4480a381752100f0c3a7411f8b00cceb3b (diff)
downloadqemu-tz-cfce8c3d4a218234144f24866f5a5e06f62a17ae.tar.gz
target-arm: Switch to common vexpress machine init
Switched the Vexpress machine initialization to use the common function with the machine pointer to board info. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
-rw-r--r--hw/arm/vexpress.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 8f22696b4..a03cb52fa 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -532,9 +532,10 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name,
return OBJECT_CHECK(pflash_t, (dev), "cfi.pflash01");
}
-static void vexpress_common_init(VEDBoardInfo *daughterboard,
- MachineState *machine)
+static void vexpress_common_init(MachineState *machine)
{
+ VexpressMachineClass *vmc = VEXPRESS_MACHINE_GET_CLASS(machine);
+ VEDBoardInfo *daughterboard = vmc->daughterboard;;
DeviceState *dev, *sysctl, *pl041;
qemu_irq pic[64];
uint32_t sys_id;
@@ -700,30 +701,13 @@ static void vexpress_common_init(VEDBoardInfo *daughterboard,
arm_load_kernel(ARM_CPU(first_cpu), &daughterboard->bootinfo);
}
-static void vexpress_init(MachineState *machine)
-{
- VexpressMachineClass *vmc = VEXPRESS_MACHINE_GET_CLASS(machine);
-
- vexpress_common_init(vmc->daughterboard, machine);
-}
-
-static void vexpress_a9_init(MachineState *machine)
-{
- vexpress_common_init(&a9_daughterboard, machine);
-}
-
-static void vexpress_a15_init(MachineState *machine)
-{
- vexpress_common_init(&a15_daughterboard, machine);
-}
-
static void vexpress_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
mc->name = TYPE_VEXPRESS_MACHINE;
mc->desc = "ARM Versatile Express";
- mc->init = vexpress_init;
+ mc->init = vexpress_common_init;
mc->block_default_type = IF_SCSI;
mc->max_cpus = 4;
}
@@ -735,7 +719,6 @@ static void vexpress_a9_class_init(ObjectClass *oc, void *data)
mc->name = TYPE_VEXPRESS_A9_MACHINE;
mc->desc = "ARM Versatile Express for Cortex-A9";
- mc->init = vexpress_a9_init;
vmc->daughterboard = &a9_daughterboard;;
}
@@ -747,7 +730,6 @@ static void vexpress_a15_class_init(ObjectClass *oc, void *data)
mc->name = TYPE_VEXPRESS_A15_MACHINE;
mc->desc = "ARM Versatile Express for Cortex-A15";
- mc->init = vexpress_a15_init;
vmc->daughterboard = &a15_daughterboard;
}