summaryrefslogtreecommitdiff
path: root/hw/arm/aspeed.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2016-12-27 14:59:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-12-27 14:59:29 +0000
commit26d5df9578927fce97a83975feecf1a3c2511610 (patch)
tree082758f8efada90344b58318268ee849b96b5a33 /hw/arm/aspeed.c
parent0584d3c33f70445085d3f223015c67dfcea97ba3 (diff)
downloadqemu-26d5df9578927fce97a83975feecf1a3c2511610.tar.gz
aspeed/smc: set the number of flash modules for the FMC controller
Add a new configuration field at the board level and propagate the value using the "num-cs" property of the FMC controller model. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 1480434248-27138-14-git-send-email-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/aspeed.c')
-rw-r--r--hw/arm/aspeed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index bc70b38789..40c13838fb 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -36,6 +36,7 @@ typedef struct AspeedBoardConfig {
uint32_t hw_strap1;
const char *fmc_model;
const char *spi_model;
+ uint32_t num_cs;
} AspeedBoardConfig;
enum {
@@ -85,18 +86,21 @@ static const AspeedBoardConfig aspeed_boards[] = {
.hw_strap1 = PALMETTO_BMC_HW_STRAP1,
.fmc_model = "n25q256a",
.spi_model = "mx25l25635e",
+ .num_cs = 1,
},
[AST2500_EVB] = {
.soc_name = "ast2500-a1",
.hw_strap1 = AST2500_EVB_HW_STRAP1,
.fmc_model = "n25q256a",
.spi_model = "mx25l25635e",
+ .num_cs = 1,
},
[ROMULUS_BMC] = {
.soc_name = "ast2500-a1",
.hw_strap1 = ROMULUS_BMC_HW_STRAP1,
.fmc_model = "n25q256a",
.spi_model = "mx66l1g45g",
+ .num_cs = 2,
},
};
@@ -143,6 +147,8 @@ static void aspeed_board_init(MachineState *machine,
&error_abort);
object_property_set_int(OBJECT(&bmc->soc), cfg->hw_strap1, "hw-strap1",
&error_abort);
+ object_property_set_int(OBJECT(&bmc->soc), cfg->num_cs, "num-cs",
+ &error_abort);
object_property_set_bool(OBJECT(&bmc->soc), true, "realized",
&error_abort);