diff options
author | Cédric Le Goater <clg@kaod.org> | 2016-12-27 14:59:27 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-12-27 14:59:27 +0000 |
commit | 6a0e947b125f5727d3e59f13cb15a5284404c27e (patch) | |
tree | 7b7962e5181a82b7feaa56e2f0e59c48d8daf6d4 /hw/arm | |
parent | bd673bd8aba8b9f316c3c95f7be872087bb55695 (diff) | |
download | qemu-6a0e947b125f5727d3e59f13cb15a5284404c27e.zip qemu-6a0e947b125f5727d3e59f13cb15a5284404c27e.tar.gz qemu-6a0e947b125f5727d3e59f13cb15a5284404c27e.tar.bz2 |
aspeed: extend the board configuration with flash models
Future machine will use different flash models for the FMC and the SPI
controllers.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 1480434248-27138-7-git-send-email-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/aspeed.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index c7206fd..159d562 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -34,6 +34,8 @@ typedef struct AspeedBoardState { typedef struct AspeedBoardConfig { const char *soc_name; uint32_t hw_strap1; + const char *fmc_model; + const char *spi_model; } AspeedBoardConfig; enum { @@ -65,8 +67,18 @@ enum { ~SCU_HW_STRAP_2ND_BOOT_WDT) static const AspeedBoardConfig aspeed_boards[] = { - [PALMETTO_BMC] = { "ast2400-a0", PALMETTO_BMC_HW_STRAP1 }, - [AST2500_EVB] = { "ast2500-a1", AST2500_EVB_HW_STRAP1 }, + [PALMETTO_BMC] = { + .soc_name = "ast2400-a0", + .hw_strap1 = PALMETTO_BMC_HW_STRAP1, + .fmc_model = "n25q256a", + .spi_model = "mx25l25635e", + }, + [AST2500_EVB] = { + .soc_name = "ast2500-a1", + .hw_strap1 = AST2500_EVB_HW_STRAP1, + .fmc_model = "n25q256a", + .spi_model = "mx25l25635e", + }, }; static void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype, @@ -128,8 +140,8 @@ static void aspeed_board_init(MachineState *machine, object_property_add_const_link(OBJECT(&bmc->soc), "ram", OBJECT(&bmc->ram), &error_abort); - aspeed_board_init_flashes(&bmc->soc.fmc, "n25q256a", &error_abort); - aspeed_board_init_flashes(&bmc->soc.spi[0], "mx25l25635e", &error_abort); + aspeed_board_init_flashes(&bmc->soc.fmc, cfg->fmc_model, &error_abort); + aspeed_board_init_flashes(&bmc->soc.spi[0], cfg->spi_model, &error_abort); aspeed_board_binfo.kernel_filename = machine->kernel_filename; aspeed_board_binfo.initrd_filename = machine->initrd_filename; |