From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bor6f-00016U-80 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 08:03:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bor6Y-0002mU-7X for qemu-devel@nongnu.org; Tue, 27 Sep 2016 08:03:28 -0400 Received: from 8.mo178.mail-out.ovh.net ([46.105.74.227]:35407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bor6X-0002mB-Tq for qemu-devel@nongnu.org; Tue, 27 Sep 2016 08:03:22 -0400 Received: from player169.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 1CBD5FFA290 for ; Tue, 27 Sep 2016 14:03:20 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Tue, 27 Sep 2016 13:57:37 +0200 Message-Id: <1474977462-28032-2-git-send-email-clg@kaod.org> In-Reply-To: <1474977462-28032-1-git-send-email-clg@kaod.org> References: <1474977462-28032-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 1/6] aspeed: rename the smc object to fmc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Peter Crosthwaite Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, Andrew Jeffery , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= The Aspeed SoC has three different types of SMC (Static Memory Controller) controllers: the SMC (legacy), the FMC (the new one) and the SPI for the host PNOR. The FMC and the SPI models are now converging on the AST2500 SoC and the SMC, which was still available on the AST2400 SoC, was removed. The Aspeed SoC does not provide support for the legacy SMC controller. So, let's rename the 'smc' object to 'fmc' to clarify its nature. Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed.c | 2 +- hw/arm/aspeed_soc.c | 18 +++++++++--------- include/hw/arm/aspeed_soc.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 6b18c7f1727c..4bb33cbb5e70 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -128,7 +128,7 @@ 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.smc, "n25q256a", &error_abort); + aspeed_board_init_flashes(&bmc->soc.fmc, "n25q256a", &error_abort); aspeed_board_init_flashes(&bmc->soc.spi, "mx25l25635e", &error_abort= ); =20 aspeed_board_binfo.kernel_filename =3D machine->kernel_filename; diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index c0a310205842..479c0d2039d9 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -100,9 +100,9 @@ static void aspeed_soc_init(Object *obj) object_property_add_alias(obj, "hw-strap2", OBJECT(&s->scu), "hw-strap2", &error_abort); =20 - object_initialize(&s->smc, sizeof(s->smc), "aspeed.smc.fmc"); - object_property_add_child(obj, "smc", OBJECT(&s->smc), NULL); - qdev_set_parent_bus(DEVICE(&s->smc), sysbus_get_default()); + object_initialize(&s->fmc, sizeof(s->fmc), "aspeed.smc.fmc"); + object_property_add_child(obj, "fmc", OBJECT(&s->fmc), NULL); + qdev_set_parent_bus(DEVICE(&s->fmc), sysbus_get_default()); =20 object_initialize(&s->spi, sizeof(s->spi), "aspeed.smc.spi"); object_property_add_child(obj, "spi", OBJECT(&s->spi), NULL); @@ -178,17 +178,17 @@ static void aspeed_soc_realize(DeviceState *dev, Er= ror **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c), 0, qdev_get_gpio_in(DEVICE(&s->vic), 12)); =20 - /* SMC */ - object_property_set_int(OBJECT(&s->smc), 1, "num-cs", &err); - object_property_set_bool(OBJECT(&s->smc), true, "realized", &local_e= rr); + /* FMC */ + object_property_set_int(OBJECT(&s->fmc), 1, "num-cs", &err); + object_property_set_bool(OBJECT(&s->fmc), true, "realized", &local_e= rr); error_propagate(&err, local_err); if (err) { error_propagate(errp, err); return; } - sysbus_mmio_map(SYS_BUS_DEVICE(&s->smc), 0, ASPEED_SOC_FMC_BASE); - sysbus_mmio_map(SYS_BUS_DEVICE(&s->smc), 1, ASPEED_SOC_FMC_FLASH_BAS= E); - sysbus_connect_irq(SYS_BUS_DEVICE(&s->smc), 0, + sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 0, ASPEED_SOC_FMC_BASE); + sysbus_mmio_map(SYS_BUS_DEVICE(&s->fmc), 1, ASPEED_SOC_FMC_FLASH_BAS= E); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->fmc), 0, qdev_get_gpio_in(DEVICE(&s->vic), 19)); =20 /* SPI */ diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 932704c380f2..7359e25fce49 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -31,7 +31,7 @@ typedef struct AspeedSoCState { AspeedTimerCtrlState timerctrl; AspeedI2CState i2c; AspeedSCUState scu; - AspeedSMCState smc; + AspeedSMCState fmc; AspeedSMCState spi; AspeedSDMCState sdmc; } AspeedSoCState; --=20 2.7.4