[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-1.6? 05/14] z2: Don't enforce use of -pflash for
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH for-1.6? 05/14] z2: Don't enforce use of -pflash for qtest |
Date: |
Mon, 29 Jul 2013 19:15:32 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/arm/z2.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 07a127b..e32efc0 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -24,6 +24,7 @@
#include "ui/console.h"
#include "audio/audio.h"
#include "exec/address-spaces.h"
+#include "sysemu/qtest.h"
#ifdef DEBUG_Z2
#define DPRINTF(fmt, ...) \
@@ -323,19 +324,21 @@ static void z2_init(QEMUMachineInitArgs *args)
be = 0;
#endif
dinfo = drive_get(IF_PFLASH, 0, 0);
- if (!dinfo) {
+ if (!dinfo && !qtest_enabled()) {
fprintf(stderr, "Flash image must be given with the "
"'pflash' parameter\n");
exit(1);
}
- if (!pflash_cfi01_register(Z2_FLASH_BASE,
- NULL, "z2.flash0", Z2_FLASH_SIZE,
- dinfo->bdrv, sector_len,
- Z2_FLASH_SIZE / sector_len, 4, 0, 0, 0, 0,
- be)) {
- fprintf(stderr, "qemu: Error registering flash memory.\n");
- exit(1);
+ if (dinfo) {
+ if (!pflash_cfi01_register(Z2_FLASH_BASE,
+ NULL, "z2.flash0", Z2_FLASH_SIZE,
+ dinfo->bdrv, sector_len,
+ Z2_FLASH_SIZE / sector_len, 4, 0, 0, 0, 0,
+ be)) {
+ fprintf(stderr, "qemu: Error registering flash memory.\n");
+ exit(1);
+ }
}
/* setup keypad */
--
1.8.1.4
- [Qemu-devel] [PATCH for-1.6? 00/14] qtest: Test all targets, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 01/14] mips_mipssim: Silence BIOS loading warning for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 07/14] omap_sx1: Don't enforce use of kernel or flash for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 10/14] axis_dev88: Don't enforce use of kernel for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 12/14] mcf5208: Don't enforce use of kernel for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 03/14] mainstone: Don't enforce use of -pflash for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 02/14] arm/boot: Turn arm_load_kernel() into no-op for qtest without -kernel, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 05/14] z2: Don't enforce use of -pflash for qtest,
Andreas Färber <=
- [Qemu-devel] [PATCH for-1.6? 06/14] palm: Don't enforce loading ROM or kernel for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 09/14] armv7m: Don't enforce use of kernel for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 13/14] an5206: Don't enforce use of kernel for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 04/14] gumstix: Don't enforce use of -pflash for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 14/14] qtest: Add dummy machine tests, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 11/14] puv3: Don't assert kernel filename for qtest, Andreas Färber, 2013/07/29
- [Qemu-devel] [PATCH for-1.6? 08/14] exynos4_boards: Silence lack of -smp 2 warning for qtest, Andreas Färber, 2013/07/29