From nobody Tue Apr 15 17:10:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582290654; cv=none; d=zohomail.com; s=zohoarc; b=kWFQ940gnb8bmcaBiZm6m6CNMZepEZiQJRoXAKo/BSkYkdXOlq+7mtkB05kFmkntnlQWRC+tx+rZk198i57fIMXFr6cBmXf19rgdeB9J6SiO0Y9W15DutmS2rs/FbqU4o1ANmD45U90PAwIDdyRFW616mfomosiww9WrMJNOyrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582290654; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CH19MfiE/v2T7HEX2v6F3oXsrclEX9/NAMZTm7XbSuc=; b=Z1sB6qQImnXFE7BEMuwASbyvuY4ZVsTf1japYzSDyPSWI81MJRmkLLSwiiiqjvwQxpAGrBQj4EutF5ep3MWWt9MksqAqWgZYdM12ApVlCwSqBqIEotH7y5MbB656cMJkGlQpZKNANfhzhQ/lVanaC5BPa18HySQwuDxIz5T3E+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582290654542131.7375385714788; Fri, 21 Feb 2020 05:10:54 -0800 (PST) Received: from localhost ([::1]:57182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j584z-0003Lb-Fd for importer@patchew.org; Fri, 21 Feb 2020 08:10:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56435) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5821-0006UA-TR for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5820-0002U7-RX for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:49 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5820-0002Tj-LS for qemu-devel@nongnu.org; Fri, 21 Feb 2020 08:07:48 -0500 Received: by mail-wr1-x444.google.com with SMTP id m16so1974598wrx.11 for ; Fri, 21 Feb 2020 05:07:48 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id p15sm3598892wma.40.2020.02.21.05.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 05:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CH19MfiE/v2T7HEX2v6F3oXsrclEX9/NAMZTm7XbSuc=; b=V5rKSUSa3NoY6J0K/3r1WBTfdW58Dc8IJV83TJYgCCtxHcoE1mN1H4QIXLqjxGccR8 ORuJH+ct4/Qaq4FYJx4/aawrDGzHfdFBaPYo37qEj7eulB14/Vv6DErwZnNwYjXbIJxJ Ct5OEXI5EBu5UA+UTZVWdgujbZLQkTul1WXDyxswXKXWGSSM6z/WhYPf5xCscLH1JcZB qg9hMtsCqBmY7FcA0pGeG4InIVs7b/E67fEp1ysiaAmeXAz1Cdj3nZ1bL2eLnMEEbhxD QwrihcR2b1dVaeU/45L3yhZ/74eBrr2o5AonBWMV/NdPj6kxPupz1UlIZ9F1lBT5Krtv oi6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CH19MfiE/v2T7HEX2v6F3oXsrclEX9/NAMZTm7XbSuc=; b=lTlsl8lcjTBkBD/ntptY1sE1FtTs0KzxDnI80wrIuXJRwlt3wLGKUj8Xvb2tt0YcSi eG0bwy+TKdfyG5S4chihtee7qgdC/gAlqPfO4Ccxa+LDCNUcxaH9aVSVvjV2hWYoecRI 4Qe8fDNuPPILcmKODdXpRwgeDofmjDIt5+mXmReTv3xG0nHXgG4Rzs89uSC/Z35R7R+u ZYBovatWYBUsHDlIpmHDVSbSxL/euTZ/ewlt0T8EISXoDf6yzAuEmUo/4fyQuy60CvuS b2edAdqbr1S/0o3KsGrddEupHAHesZwu1GF9SHt8vEP6cJJAAiMJMGhPpKPV4ZxgyFKq d9gg== X-Gm-Message-State: APjAAAVjaWx110htZfK1qufVFZux0YUhxcMew097gw17IR4iaWIk0ESw rG04ivYDJfv0EotNYNKjcmMIok8tOFA/mg== X-Google-Smtp-Source: APXvYqyvalDmHXL4QM+9PdfpDLTvd2MHnEhr7gZCgg0j6H//u8knKln1QRmOf3QJ2sYU+vQCX/dLjQ== X-Received: by 2002:adf:b605:: with SMTP id f5mr46475467wre.383.1582290467353; Fri, 21 Feb 2020 05:07:47 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/52] mainstone: Make providing flash images non-mandatory Date: Fri, 21 Feb 2020 13:06:52 +0000 Message-Id: <20200221130740.7583-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200221130740.7583-1-peter.maydell@linaro.org> References: <20200221130740.7583-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200217210824.18513-1-linux@roeck-us.net Signed-off-by: Peter Maydell --- hw/arm/mainstone.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index b01ce3ce08c..6e64dfab506 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -138,19 +138,10 @@ static void mainstone_common_init(MemoryRegion *addre= ss_space_mem, /* There are two 32MiB flash devices on the board */ for (i =3D 0; i < 2; i ++) { dinfo =3D 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.fla= sh0", MAINSTONE_FLASH, - blk_by_legacy_dinfo(dinfo), + dinfo ? blk_by_legacy_dinfo(dinfo) : NU= LL, sector_len, 4, 0, 0, 0, 0, be)) { error_report("Error registering flash memory"); exit(1); --=20 2.20.1