hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate
Commit ba1ba5cca
introduce the ARM_CPU_TYPE_NAME() macro.
Unify the code base by use it in all places.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190823143249.8096-2-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
e0a0c8322b
commit
8a863c8120
@ -30,7 +30,8 @@ static void aw_a10_init(Object *obj)
|
||||
AwA10State *s = AW_A10(obj);
|
||||
|
||||
object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
|
||||
"cortex-a8-" TYPE_ARM_CPU, &error_abort, NULL);
|
||||
ARM_CPU_TYPE_NAME("cortex-a8"),
|
||||
&error_abort, NULL);
|
||||
|
||||
sysbus_init_child_obj(obj, "intc", &s->intc, sizeof(s->intc),
|
||||
TYPE_AW_A10_PIC);
|
||||
|
@ -81,7 +81,8 @@ static void cubieboard_init(MachineState *machine)
|
||||
|
||||
static void cubieboard_machine_init(MachineClass *mc)
|
||||
{
|
||||
mc->desc = "cubietech cubieboard";
|
||||
mc->desc = "cubietech cubieboard (Cortex-A9)";
|
||||
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
|
||||
mc->init = cubieboard_init;
|
||||
mc->block_default_type = IF_IDE;
|
||||
mc->units_per_default_bus = 1;
|
||||
|
@ -37,7 +37,8 @@ static void digic_init(Object *obj)
|
||||
int i;
|
||||
|
||||
object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
|
||||
"arm946-" TYPE_ARM_CPU, &error_abort, NULL);
|
||||
ARM_CPU_TYPE_NAME("arm946"),
|
||||
&error_abort, NULL);
|
||||
|
||||
for (i = 0; i < DIGIC4_NB_TIMERS; i++) {
|
||||
#define DIGIC_TIMER_NAME_MLEN 11
|
||||
|
@ -36,7 +36,7 @@ static void fsl_imx25_init(Object *obj)
|
||||
FslIMX25State *s = FSL_IMX25(obj);
|
||||
int i;
|
||||
|
||||
object_initialize(&s->cpu, sizeof(s->cpu), "arm926-" TYPE_ARM_CPU);
|
||||
object_initialize(&s->cpu, sizeof(s->cpu), ARM_CPU_TYPE_NAME("arm926"));
|
||||
|
||||
sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
|
||||
TYPE_IMX_AVIC);
|
||||
|
@ -33,7 +33,7 @@ static void fsl_imx31_init(Object *obj)
|
||||
FslIMX31State *s = FSL_IMX31(obj);
|
||||
int i;
|
||||
|
||||
object_initialize(&s->cpu, sizeof(s->cpu), "arm1136-" TYPE_ARM_CPU);
|
||||
object_initialize(&s->cpu, sizeof(s->cpu), ARM_CPU_TYPE_NAME("arm1136"));
|
||||
|
||||
sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
|
||||
TYPE_IMX_AVIC);
|
||||
|
@ -43,7 +43,8 @@ static void fsl_imx6_init(Object *obj)
|
||||
for (i = 0; i < MIN(ms->smp.cpus, FSL_IMX6_NUM_CPUS); i++) {
|
||||
snprintf(name, NAME_SIZE, "cpu%d", i);
|
||||
object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
|
||||
"cortex-a9-" TYPE_ARM_CPU, &error_abort, NULL);
|
||||
ARM_CPU_TYPE_NAME("cortex-a9"),
|
||||
&error_abort, NULL);
|
||||
}
|
||||
|
||||
sysbus_init_child_obj(obj, "a9mpcore", &s->a9mpcore, sizeof(s->a9mpcore),
|
||||
|
@ -34,7 +34,7 @@ static void fsl_imx6ul_init(Object *obj)
|
||||
int i;
|
||||
|
||||
object_initialize_child(obj, "cpu0", &s->cpu, sizeof(s->cpu),
|
||||
"cortex-a7-" TYPE_ARM_CPU, &error_abort, NULL);
|
||||
ARM_CPU_TYPE_NAME("cortex-a7"), &error_abort, NULL);
|
||||
|
||||
/*
|
||||
* A7MPCORE
|
||||
|
@ -196,8 +196,8 @@ static void xlnx_zynqmp_create_rpu(MachineState *ms, XlnxZynqMPState *s,
|
||||
|
||||
object_initialize_child(OBJECT(&s->rpu_cluster), "rpu-cpu[*]",
|
||||
&s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
|
||||
"cortex-r5f-" TYPE_ARM_CPU, &error_abort,
|
||||
NULL);
|
||||
ARM_CPU_TYPE_NAME("cortex-r5f"),
|
||||
&error_abort, NULL);
|
||||
|
||||
name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i]));
|
||||
if (strcmp(name, boot_cpu)) {
|
||||
@ -237,8 +237,8 @@ static void xlnx_zynqmp_init(Object *obj)
|
||||
for (i = 0; i < num_apus; i++) {
|
||||
object_initialize_child(OBJECT(&s->apu_cluster), "apu-cpu[*]",
|
||||
&s->apu_cpu[i], sizeof(s->apu_cpu[i]),
|
||||
"cortex-a53-" TYPE_ARM_CPU, &error_abort,
|
||||
NULL);
|
||||
ARM_CPU_TYPE_NAME("cortex-a53"),
|
||||
&error_abort, NULL);
|
||||
}
|
||||
|
||||
sysbus_init_child_obj(obj, "gic", &s->gic, sizeof(s->gic),
|
||||
|
Loading…
Reference in New Issue
Block a user