diff mbox

[for-2.9,26/30] aspeed/smc: use flash model option

Message ID 1480434248-27138-27-git-send-email-clg@kaod.org
State New
Headers show

Commit Message

Cédric Le Goater Nov. 29, 2016, 3:44 p.m. UTC
so that we can change the flash model from the command line.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
---
 hw/arm/aspeed.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Cédric Le Goater Nov. 30, 2016, 4:26 p.m. UTC | #1
On 11/29/2016 04:44 PM, Cédric Le Goater wrote:
> so that we can change the flash model from the command line.

After kevin input on this topic, we should drop patch 25 and 26.

Thanks,

C. 

> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
> ---
>  hw/arm/aspeed.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index a92c2f1c362b..f4232ce42cd0 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -138,6 +138,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
>
diff mbox

Patch

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index a92c2f1c362b..f4232ce42cd0 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -138,6 +138,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