Skip to content

Commit

Permalink
hw/arm/aspeed: Set default CPU count using aspeed_soc_num_cpus()
Browse files Browse the repository at this point in the history
Since commit b7f1a0c ("arm/aspeed: Compute the number
of CPUs from the SoC definition") Aspeed machines use the
aspeed_soc_num_cpus() helper to set the number of CPUs.

Use it for the ast1030-evb (commit 356b230 "aspeed/soc:
Add AST1030 support") and supermicrox11-bmc (commit 40a38df
"hw/arm/aspeed: Add board model for Supermicro X11 BMC") machines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
  • Loading branch information
philmd authored and legoater committed Feb 1, 2024
1 parent 2e3b9c9 commit 0e42592
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hw/arm/aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,8 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc,
amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON;
amc->i2c_init = palmetto_bmc_i2c_init;
mc->default_ram_size = 256 * MiB;
mc->default_cpus = mc->min_cpus = mc->max_cpus =
aspeed_soc_num_cpus(amc->soc_name);
}

static void aspeed_machine_supermicro_x11spi_bmc_class_init(ObjectClass *oc,
Expand Down Expand Up @@ -1586,11 +1588,12 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
mc->init = aspeed_minibmc_machine_init;
amc->i2c_init = ast1030_evb_i2c_init;
mc->default_ram_size = 0;
mc->default_cpus = mc->min_cpus = mc->max_cpus = 1;
amc->fmc_model = "sst25vf032b";
amc->spi_model = "sst25vf032b";
amc->num_cs = 2;
amc->macs_mask = 0;
mc->default_cpus = mc->min_cpus = mc->max_cpus =
aspeed_soc_num_cpus(amc->soc_name);
}

static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,
Expand Down

0 comments on commit 0e42592

Please sign in to comment.