diff options
author | Guenter Roeck <linux@roeck-us.net> | 2020-02-17 13:08:24 -0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-21 16:07:00 +0000 |
commit | d4cf262ab5b057dff0dff86e90de9b1b8a32b307 (patch) | |
tree | 8f83da742c0f4f04f4edf7dcfc69bbdde7689eba /hw | |
parent | 9df7401b80e7b19789aa625d77fe79c1f48b4b84 (diff) |
mainstone: Make providing flash images non-mandatory
Up to now, the mainstone machine only boots if two flash images are
provided. This is not really necessary; the machine can boot from initrd
or from SD without it. At the same time, having to provide dummy flash
images is a nuisance and does not add any real value. Make it optional.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200217210824.18513-1-linux@roeck-us.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/mainstone.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index b01ce3ce08..6e64dfab50 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -138,19 +138,10 @@ static void mainstone_common_init(MemoryRegion *address_space_mem, /* There are two 32MiB flash devices on the board */ for (i = 0; i < 2; i ++) { dinfo = drive_get(IF_PFLASH, 0, i); - if (!dinfo) { - if (qtest_enabled()) { - break; - } - error_report("Two flash images must be given with the " - "'pflash' parameter"); - exit(1); - } - if (!pflash_cfi01_register(mainstone_flash_base[i], i ? "mainstone.flash1" : "mainstone.flash0", MAINSTONE_FLASH, - blk_by_legacy_dinfo(dinfo), + dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, sector_len, 4, 0, 0, 0, 0, be)) { error_report("Error registering flash memory"); exit(1); |