Skip to content

Commit

Permalink
hw/riscv: sifive_u: Use SIFIVE_U_CPU for mc->default_cpu_type
Browse files Browse the repository at this point in the history
SIFIVE_U_CPU is conditionally set to SIFIVE_U34 or SIFIVE_U54, hence
there is no need to use #idef to set the mc->default_cpu_type.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20210109143637.29645-1-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
lbmeng authored and alistair23 committed Jan 16, 2021
1 parent d102f19 commit 1eaada8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions hw/riscv/sifive_u.c
Expand Up @@ -628,11 +628,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data)
mc->init = sifive_u_machine_init;
mc->max_cpus = SIFIVE_U_MANAGEMENT_CPU_COUNT + SIFIVE_U_COMPUTE_CPU_COUNT;
mc->min_cpus = SIFIVE_U_MANAGEMENT_CPU_COUNT + 1;
#if defined(TARGET_RISCV32)
mc->default_cpu_type = TYPE_RISCV_CPU_SIFIVE_U34;
#elif defined(TARGET_RISCV64)
mc->default_cpu_type = TYPE_RISCV_CPU_SIFIVE_U54;
#endif
mc->default_cpu_type = SIFIVE_U_CPU;
mc->default_cpus = mc->min_cpus;

object_class_property_add_bool(oc, "start-in-flash",
Expand Down

0 comments on commit 1eaada8

Please sign in to comment.