[PATCH qemu 24/38] aspeed/smc: use flash model option

Cédric Le Goater clg at kaod.org
Sat Nov 19 01:22:04 AEDT 2016


so that we can change the flash model from the command line.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 hw/arm/aspeed.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 3e1781f30f55..0108512b070d 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -135,6 +135,8 @@ static void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype,
         DriveInfo *dinfo = drive_get_next(IF_MTD);
         qemu_irq cs_line;
 
+        flashtype = dinfo && dinfo->model ? dinfo->model : flashtype;
+
         /*
          * FIXME: check that we are not using a flash module exceeding
          * the controller segment size
-- 
2.7.4



More information about the openbmc mailing list