From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO6J7-0002wa-It for qemu-devel@nongnu.org; Mon, 23 Sep 2013 09:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VO6Iy-0006RY-Jm for qemu-devel@nongnu.org; Mon, 23 Sep 2013 09:36:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35248 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO6Iy-0006RD-AR for qemu-devel@nongnu.org; Mon, 23 Sep 2013 09:36:00 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 23 Sep 2013 15:35:39 +0200 Message-Id: <1379943352-1979-6-git-send-email-afaerber@suse.de> In-Reply-To: <1379943352-1979-1-git-send-email-afaerber@suse.de> References: <1379943352-1979-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 05/18] gumstix: Don't enforce use of -pflash for qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paul Brook Signed-off-by: Andreas F=C3=A4rber --- hw/arm/gumstix.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c index e97fbbd..aeea172 100644 --- a/hw/arm/gumstix.c +++ b/hw/arm/gumstix.c @@ -42,6 +42,7 @@ #include "hw/boards.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" +#include "sysemu/qtest.h" =20 static const int sector_len =3D 128 * 1024; =20 @@ -58,7 +59,7 @@ static void connex_init(QEMUMachineInitArgs *args) cpu =3D pxa255_init(address_space_mem, connex_ram); =20 dinfo =3D drive_get(IF_PFLASH, 0, 0); - if (!dinfo) { + if (!dinfo && !qtest_enabled()) { fprintf(stderr, "A flash image must be given with the " "'pflash' parameter\n"); exit(1); @@ -70,7 +71,8 @@ static void connex_init(QEMUMachineInitArgs *args) be =3D 0; #endif if (!pflash_cfi01_register(0x00000000, NULL, "connext.rom", connex_r= om, - dinfo->bdrv, sector_len, connex_rom / sec= tor_len, + dinfo ? dinfo->bdrv : NULL, + sector_len, connex_rom / sector_len, 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); @@ -95,7 +97,7 @@ static void verdex_init(QEMUMachineInitArgs *args) cpu =3D pxa270_init(address_space_mem, verdex_ram, cpu_model ?: "pxa= 270-c0"); =20 dinfo =3D drive_get(IF_PFLASH, 0, 0); - if (!dinfo) { + if (!dinfo && !qtest_enabled()) { fprintf(stderr, "A flash image must be given with the " "'pflash' parameter\n"); exit(1); @@ -107,7 +109,8 @@ static void verdex_init(QEMUMachineInitArgs *args) be =3D 0; #endif if (!pflash_cfi01_register(0x00000000, NULL, "verdex.rom", verdex_ro= m, - dinfo->bdrv, sector_len, verdex_rom / sec= tor_len, + dinfo ? dinfo->bdrv : NULL, + sector_len, verdex_rom / sector_len, 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); --=20 1.8.1.4