From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBkbJ-0006ia-4V for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:45:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBkbI-0004qO-6h for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:45:45 -0500 Received: from 17.mo1.mail-out.ovh.net ([87.98.179.142]:37158) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBkbH-0004pM-RV for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:45:44 -0500 Received: from player795.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 939BE1F452 for ; Tue, 29 Nov 2016 16:45:42 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Tue, 29 Nov 2016 16:43:44 +0100 Message-Id: <1480434248-27138-7-git-send-email-clg@kaod.org> In-Reply-To: <1480434248-27138-1-git-send-email-clg@kaod.org> References: <1480434248-27138-1-git-send-email-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-2.9 06/30] aspeed: extend the board configuration with flash models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, Andrew Jeffery , Marcin Krzeminski , Peter Crosthwaite , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Future machine will use different flash models for the FMC and the SPI controllers. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery --- hw/arm/aspeed.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index c7206fda6d85..159d562e8912 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; =20 enum { @@ -65,8 +67,18 @@ enum { ~SCU_HW_STRAP_2ND_BOOT_WDT) =20 static const AspeedBoardConfig aspeed_boards[] =3D { - [PALMETTO_BMC] =3D { "ast2400-a0", PALMETTO_BMC_HW_STRAP1 }, - [AST2500_EVB] =3D { "ast2500-a1", AST2500_EVB_HW_STRAP1 }, + [PALMETTO_BMC] =3D { + .soc_name =3D "ast2400-a0", + .hw_strap1 =3D PALMETTO_BMC_HW_STRAP1, + .fmc_model =3D "n25q256a", + .spi_model =3D "mx25l25635e", + }, + [AST2500_EVB] =3D { + .soc_name =3D "ast2500-a1", + .hw_strap1 =3D AST2500_EVB_HW_STRAP1, + .fmc_model =3D "n25q256a", + .spi_model =3D "mx25l25635e", + }, }; =20 static void aspeed_board_init_flashes(AspeedSMCState *s, const char *fla= shtype, @@ -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); =20 - aspeed_board_init_flashes(&bmc->soc.fmc, "n25q256a", &error_abort); - aspeed_board_init_flashes(&bmc->soc.spi[0], "mx25l25635e", &error_ab= ort); + aspeed_board_init_flashes(&bmc->soc.fmc, cfg->fmc_model, &error_abor= t); + aspeed_board_init_flashes(&bmc->soc.spi[0], cfg->spi_model, &error_a= bort); =20 aspeed_board_binfo.kernel_filename =3D machine->kernel_filename; aspeed_board_binfo.initrd_filename =3D machine->initrd_filename; --=20 2.7.4