From patchwork Tue Nov 29 15:44:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 700633 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tSpdQ58JCz9t2C for ; Wed, 30 Nov 2016 03:18:50 +1100 (AEDT) Received: from localhost ([::1]:37881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBl7H-0000wP-Hz for incoming@patchwork.ozlabs.org; Tue, 29 Nov 2016 11:18:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBkdq-0000P4-Cp for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:48:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBkdm-0005r4-C6 for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:48:22 -0500 Received: from 10.mo1.mail-out.ovh.net ([178.32.96.102]:33414) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBkdm-0005qo-5x for qemu-devel@nongnu.org; Tue, 29 Nov 2016 10:48:18 -0500 Received: from player795.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 4D7731F5D3 for ; Tue, 29 Nov 2016 16:48:16 +0100 (CET) Received: from hermes.lab.toulouse-stg.fr.ibm.com (deibp9eh1--blueice2n7.emea.ibm.com [195.212.29.169]) (Authenticated sender: clg@kaod.org) by player795.ha.ovh.net (Postfix) with ESMTPSA id BECE11200B7; Tue, 29 Nov 2016 16:48:08 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Peter Maydell Date: Tue, 29 Nov 2016 16:44:04 +0100 Message-Id: <1480434248-27138-27-git-send-email-clg@kaod.org> X-Mailer: git-send-email 2.7.4 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 X-Ovh-Tracer-Id: 11763402227990629137 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelfedrfeejgddvtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 178.32.96.102 Subject: [Qemu-devel] [PATCH for-2.9 26/30] aspeed/smc: use flash model option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Crosthwaite , Andrew Jeffery , Marcin Krzeminski , qemu-devel@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" so that we can change the flash model from the command line. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- 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