diff options
author | Pekka Enberg <penberg@iki.fi> | 2018-02-15 18:29:36 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-02-15 18:33:46 +0000 |
commit | d9f8bbd8eb4e95db97cf02bd03af86a3d606f4f1 (patch) | |
tree | c6447912876e845f298f5ef723ed8b384eac2391 /hw/arm/raspi.c | |
parent | 57bb31568114023f67680d6fe478ceb13c51aa7d (diff) |
bcm2836: Make CPU type configurable
This patch adds a "cpu-type" property to BCM2836 SoC in preparation for
reusing the code for the Raspberry Pi 3, which has a different processor
model.
Signed-off-by: Pekka Enberg <penberg@iki.fi>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/raspi.c')
-rw-r--r-- | hw/arm/raspi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index cd5fa8c3dc..c24a4a1b14 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -135,6 +135,8 @@ static void raspi2_init(MachineState *machine) /* Setup the SOC */ object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram), &error_abort); + object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type", + &error_abort); object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus", &error_abort); object_property_set_int(OBJECT(&s->soc), 0xa21041, "board-rev", @@ -166,6 +168,7 @@ static void raspi2_machine_init(MachineClass *mc) mc->no_parallel = 1; mc->no_floppy = 1; mc->no_cdrom = 1; + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15"); mc->max_cpus = BCM2836_NCPUS; mc->min_cpus = BCM2836_NCPUS; mc->default_cpus = BCM2836_NCPUS; |