Message ID | 20230113141126.535646-15-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | ec177b73004d0ce59750bea75d6334f13d52fb88 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp247882pvb; Fri, 13 Jan 2023 06:57:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXs0UIiebqcnCx91K0g67BcgPV4QlL+vd1N4ziVD7BWgjGJPwlvaqPmh7jAYZ5vnk3o8m4jR X-Received: by 2002:a05:622a:59c9:b0:3ac:9f39:24fd with SMTP id gc9-20020a05622a59c900b003ac9f3924fdmr23235046qtb.6.1673621858540; Fri, 13 Jan 2023 06:57:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673621858; cv=none; d=google.com; s=arc-20160816; b=C/TkZLzImoBZuCZi9vSf53DKHuKy0NOW2y4MSlCMWGl/P2IJp4EjxnsW2p1FlV4ai+ qoPy6776yRRyb+PoVV8AiUdav3TElo8XGTXObDkTKLJFzJSird1+OcWVo0+0c+tF5kr6 PdRXAcsJ2K73G+x1iDINPiSVpMfdUJ7nQ3NwF0pAL3o457jzeR5V84K0SQ/J1K4OxR7O NY9LIfH7nTIjTNk3A8j9eqVtwHD4M3CrIG6/ToPJ0Fa3w6P4WbZWuE2d2okldTON3fQF Mwz5M9loj24ElgxP28ymjiPV/NDnSnEeyY7q6K2Bqyc7CwNpLJxDAJGExt4NlKKMidYb /Yiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=p5wUjZHNEX4wvPYtRpYJpyJdLoIbuRacZePj/0c5n/s=; b=NScWC09QRbQcWloedsCUTYRIbGQu0G0qpV6chxO1LN6XmfcrvRuKkzB92iZjIz5EN7 Aia2YqXP85bU9AL594YmEkPP3OutLkq4qFxT7TWdQZ25TGm/UnTsrXggvQlSMIJVgkI9 ZJWuTXQiYbCt4Yvz27FCGmuVthl/tS3g/Ju6qsdS4gEwpe9teFldOQVLVkUU2f/6zhaP 2zC6dvwZT2wNVUYApkMtsEDRlGNaZiETDwj+LMjjYuQbnss2mShMzxU1g9fBS8eIj2X8 wcR8iQIidP3G1Qt2kMIPa2YsvW/U8J9T/pBRqrfFbhGOPwCVXlYTesm2OtKB2W1XQQgD pPvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=skDG2nMa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gd9-20020a05622a5c0900b003a820804e2dsi12793467qtb.556.2023.01.13.06.57.38 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2023 06:57:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=skDG2nMa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1pGKnG-0001Tf-6y; Fri, 13 Jan 2023 09:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>) id 1pGKmh-00010W-MC for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:56 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>) id 1pGKmT-0003ef-UU for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:45 -0500 Received: by mail-wm1-x334.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so17449441wms.4 for <qemu-devel@nongnu.org>; Fri, 13 Jan 2023 06:11:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=p5wUjZHNEX4wvPYtRpYJpyJdLoIbuRacZePj/0c5n/s=; b=skDG2nMakcCjDePVX6rNJFWF6KgeLqZgGWDYIvI+b9sWdottF6GUl21KOJ7kC/9ASJ pO4UNcKjffqrlVu4hWKEAhHc9yLLQaQ649CH/oyb9NnTP8fv08H0soZ20QsUA8sECjyD 5rlzp8ZvPsU4dw9nuY7QIKlMe9sO0yo+6oUxjAn81Bjlb6Ift3GSoaqLFo2jOZqEQBYL UVIhUWunYlqhpbIvdFr2cv0z1d7ZetlobmrTvf2DBb0amQ28miv+OJYL3eJvwiLmyLwG 29c8eDcOgQ1qzDGcDskIkYoHc4uvKSc8DqMZdWvBMKkaoY7CPYj2qeDHK3u31XQ1mQA3 cLEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p5wUjZHNEX4wvPYtRpYJpyJdLoIbuRacZePj/0c5n/s=; b=fIDE7wQlmNcaSaU0pOc+HjNKAcg2giMPNxw6WKEmtrvnStjb3HctadTGuLGFLoKpZO JnTE/qKRe+bXPUeFSLzKxFBeH+TKch3S43TPmRpNdWeOg3s0em8fqW0chvtblP77vRJ3 GFRdKHXo8YthAicpX4lL3VITutLcJFClFAbzLt8flqfnHQD4Hf1LpU+N2hjqEEL5DDFq kDWEtoMBn+XMR3NNbALB9ukx3DovAY8z0gHJP4piFKkSnZA/fRUd7zHgf+W1orCaI2Sa Unm9py44n20Dca1CcBTJvCLNwbTiOBfXUExSO0riSMvboKqTQY/uIL50iXMlTCmj8Pz0 d/9A== X-Gm-Message-State: AFqh2koGi0WMjy1Zu+yDw6lWs2Akpg7yoI8AxBknPzgW1ioIrC7jaDA3 ucbgZhFqTREi9K+VerAtKZcZcQmKzo3BFMBb X-Received: by 2002:a05:600c:3d0e:b0:3d3:4aa6:4fd0 with SMTP id bh14-20020a05600c3d0e00b003d34aa64fd0mr58858177wmb.6.1673619100253; Fri, 13 Jan 2023 06:11:40 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n36-20020a05600c502400b003da0b75de94sm5334464wmr.8.2023.01.13.06.11.39 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 06:11:39 -0800 (PST) From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 14/38] hw/arm/collie: Simplify flash creation using for() loop Date: Fri, 13 Jan 2023 14:11:02 +0000 Message-Id: <20230113141126.535646-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113141126.535646-1-peter.maydell@linaro.org> References: <20230113141126.535646-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/38] hw/arm/stm32f405: correctly describe the memory layout
|
expand
|
diff --git a/hw/arm/collie.c b/hw/arm/collie.c index d59c376e601..9edff593708 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -40,7 +40,6 @@ static struct arm_boot_info collie_binfo = { static void collie_init(MachineState *machine) { - DriveInfo *dinfo; MachineClass *mc = MACHINE_GET_CLASS(machine); CollieMachineState *cms = COLLIE_MACHINE(machine); @@ -55,15 +54,13 @@ static void collie_init(MachineState *machine) memory_region_add_subregion(get_system_memory(), SA_SDCS0, machine->ram); - dinfo = drive_get(IF_PFLASH, 0, 0); - pflash_cfi01_register(SA_CS0, "collie.fl1", FLASH_SIZE, - dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - FLASH_SECTOR_SIZE, 4, 0x00, 0x00, 0x00, 0x00, 0); - - dinfo = drive_get(IF_PFLASH, 0, 1); - pflash_cfi01_register(SA_CS1, "collie.fl2", FLASH_SIZE, - dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - FLASH_SECTOR_SIZE, 4, 0x00, 0x00, 0x00, 0x00, 0); + for (unsigned i = 0; i < 2; i++) { + DriveInfo *dinfo = drive_get(IF_PFLASH, 0, i); + pflash_cfi01_register(i ? SA_CS1 : SA_CS0, + i ? "collie.fl2" : "collie.fl1", FLASH_SIZE, + dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, + FLASH_SECTOR_SIZE, 4, 0x00, 0x00, 0x00, 0x00, 0); + } sysbus_create_simple("scoop", 0x40800000, NULL);