From patchwork Mon Jan 9 12:01:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640632 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2105378pvb; Mon, 9 Jan 2023 04:30:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMcAM+PRdvJy+KCZkC5VWifUj33P8io12OPVpX/a4yMNzO553zUSTzhiFj8i+iJwVZqY+3 X-Received: by 2002:a05:6102:38d4:b0:3cd:95ce:3703 with SMTP id k20-20020a05610238d400b003cd95ce3703mr21391074vst.25.1673267459157; Mon, 09 Jan 2023 04:30:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673267459; cv=none; d=google.com; s=arc-20160816; b=gsMfYYSbkUY5sjDbf368NTWPCUNmIEke03HDLxc4ghzUo4oyME1is+nPLM/Q/Wltbm lJy0WS2jWqo9D1NDZ8HjSbfOQiaMzJmdqrhz+XCv9txuLZ/e7IZPyMsmqMzB9j7yQJ6T OiqpbQbEEpdRkOQv094kBa2wf29w1Ta0YiFSwCw5sAQcf//en3gH8NA646O5fyDkTl1s EzPD+uEf3U1+U0HclBScuY8tl96oYIIxiDRjr8eydAL7zAxMa21CFJcmeb14gQB9bZv9 u1jLSV5T8J2wKZTUzvx1l9JK+2+vamW+wjDxHrDTuyRRFDd+Fgmi2lwNUDcJ/ltOfaA2 uIWQ== 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:cc:to :from:dkim-signature; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=xxfB4MK4B0/11PRXvixNAEvQ9oYRH5G5W1A8TDWajZmOHgC6yybOfNStao5Hd90ydN nv8K0i69e0PUU8RJm2jz9q+bFRBEtlw9gnDtsYjaVNmJu+PYbu9pI0UVqyHGXj7wr74/ LrAptjmqvEnHwqFxqj4eXD335yp7b9FR1Yc/53lEeCx5rdwRaWPeuaP/qaBC1oTI6pfo VzBIbWPNM4iFibCIemfW8EoNRdNKJaB36hVPrdq5ZmCK/Gjbyuw3HVXIbhrk5NkdtZBM yffqC69rkKB6BbMzDt+nUC5VxRbLvvGBqRkLt7UVEfbPkKbRSf/2SmQxgich7b08vKtN coFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xg9IfuLI; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o3-20020a05620a2a0300b006f728fb70f3si4864650qkp.500.2023.01.09.04.30.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:30:59 -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=xg9IfuLI; 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 ) id 1pEqqw-0005sJ-N0; Mon, 09 Jan 2023 07:02:10 -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 ) id 1pEqqt-0005oa-6o for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:07 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqqp-0001uW-PN for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:06 -0500 Received: by mail-wm1-x32b.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso2312206wms.4 for ; Mon, 09 Jan 2023 04:02:03 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=xg9IfuLI7eQOsq6ONF5YgbO9EswzewJzZ7mXUWKY/+tkBLy+bo33lQNdSBahGMH/I7 q6Cfnd2GL8D6M7dnejza88qrS61xE+g8FLsF/1tQCiOJCEsUxkpJ9j030wm7LZnT9Q3h jOkddAkCxp13S7/X2b4RNi1htgt7pCdicYSG1Qej3TqdJ9uqEzNdvakjetrlrLNVjsw2 O4oXPYAJp+8a7Ib8C8ahMnrexrfrHSfp09qjtxwnt89dnZxfNTXZm5O+7iQtYxSVpWcC 6DyN3wOqYJN3iEwe8zY7NJW7LI9ALFQR8QZM2bUTMNGwrez8zfzX6wOqgTy9wtzB3KZM ZGkA== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c6I1HLCSYyw0uAOoILOG7NYLqOybQWcLBPyeCZd7TC0=; b=nKNePpQ80tmS5pqMZJU90xoMB7qGo/AlLTfLk6XUGbMC/ES+D0Qse5ruiRJIHrclhn Ieqdpwld2n6ndK2tf3cX1ZCO0id1SvJCsU+wBy0X4pWwKZntNaPb54cVFSLn7QdiY2Ch 38aVZ5FIEx2gniZZIp7ToTbrWfukp35n7dB3m/00dj0vJKWvjkUnlC2j+zGRD2O/Fh70 9QwpIB4xHGLldUTk/FV1jaxzwuCQ9MoYalLBkD3nLkc6hfISMHa26DWXLzPE0Vfoh5Ll cxs9d44KkL5Uw5HiwpwBQ2NdhVauc+F/lRQQq10n/kqTuBITatUOtVnieOYRyqmmtFQy j1RA== X-Gm-Message-State: AFqh2krtTPtX0xxddvCw7BMsVKAVprKikXLxPbqqAXjtAABTvY6CRRit zm8norqtg+MuQSJj64RLUARhmgbeeJerauwv X-Received: by 2002:a05:600c:4d14:b0:3d3:5c7d:a5f3 with SMTP id u20-20020a05600c4d1400b003d35c7da5f3mr49498434wmp.37.1673265721968; Mon, 09 Jan 2023 04:02:01 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bi22-20020a05600c3d9600b003d208eb17ecsm11123199wmb.26.2023.01.09.04.02.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 1/5] hw/ppc/sam460ex: Remove unreachable code calling pflash_cfi01_register() Date: Mon, 9 Jan 2023 13:01:50 +0100 Message-Id: <20230109120154.2868-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since its QOM'ification in commit 368a354f02 ("pflash_cfi0x: QOMified") the pflash_cfi01_register() function does not fail. This call was later converted with a script to use &error_fatal, still unable to fail. Remove the unreachable code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan --- hw/ppc/sam460ex.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 4a22ce3761..cf7213f7c9 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -103,14 +103,10 @@ static int sam460ex_load_uboot(void) DriveInfo *dinfo; dinfo = drive_get(IF_PFLASH, 0, 0); - if (!pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32), - "sam460ex.flash", FLASH_SIZE, - dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1)) { - error_report("Error registering flash memory"); - /* XXX: return an error instead? */ - exit(1); - } + pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32), + "sam460ex.flash", FLASH_SIZE, + dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, + 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1)); if (!dinfo) { /*error_report("No flash image given with the 'pflash' parameter," From patchwork Mon Jan 9 12:01:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640611 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2098043pvb; Mon, 9 Jan 2023 04:13:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJear7F0tlIFe+9Qcd3h+cVpCsW5DEai0LrveOHCR4Lzvq9xnK5O6wbyDpztA/LdEJ8Diq X-Received: by 2002:ac8:4816:0:b0:3ad:45c1:12f1 with SMTP id g22-20020ac84816000000b003ad45c112f1mr4787262qtq.48.1673266414174; Mon, 09 Jan 2023 04:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673266414; cv=none; d=google.com; s=arc-20160816; b=SsCTRQvus+J4s8nOS2ljIv3y07PTF9LiTAu1tW4QBFa/5nsbZe8W/qh06SffB8hlHb wvjrVosDyAstg83tVGovpBF3b98j/WZrma1T3Qi9ZokU4R0frSiTB7EjEdMtzWlR6rFg esBpLhPOsRCM/5ewcVzAB+F1FgC99olAdCxz57XgnVdO+4FmF/7uc6qRAjqxauZ/Endu A6WTesY4yyfZGx4/QGmU2nXNYtV4PX5XsOdS0tX0q7/Wd081NcMfAISw2nMhrC2jme+Z xWE3QArYH1ef1M9zyMVohQ+GkGwDPDgMTtKWtb3Y3jvA2C6hr/dN35ljHotim0+xSaiF uxEQ== 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:cc:to :from:dkim-signature; bh=ItM+Iu1qenI4Asn3N+2BGwmWBIaMxDGBPbjt9fpGqnQ=; b=y86tpRUARwCYtoB2r+7lhslqc36d21HxSFECsBwL9CokppIydpIdKDt0bz21SPoylZ oLcr3v0M15bhqs8nLOKo87rThAme/66thzIxi76vez9w5R07ymQHUA4wSVnRNJkN3euK jixE82BRdTA5WpzmO+Dsa/eKKHerNqHmzVSK/bEZERrpCpLIrQ2JZXP1EGl0bFoI9nif cthen72qc31YH3ZNH0KX4GAJxqF6upwdiMf2k3THqOwCboMm0RKqeQYL1XJuAPOO/5Yv sjVFev2I3V+ve5krmvpWTs/8MlMesoOQW13XdhxfecGFvDkawKFxz/A38qJh9bpeX1n1 ZECw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QNyTlnb1; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x9-20020ac87309000000b003a7e4129f82si4226194qto.741.2023.01.09.04.13.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:13:34 -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=QNyTlnb1; 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 ) id 1pEqqz-0005tr-5m; Mon, 09 Jan 2023 07:02:13 -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 ) id 1pEqqw-0005sN-In for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:10 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqqu-0001zG-QY for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:10 -0500 Received: by mail-wm1-x332.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so6486111wms.4 for ; Mon, 09 Jan 2023 04:02:08 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ItM+Iu1qenI4Asn3N+2BGwmWBIaMxDGBPbjt9fpGqnQ=; b=QNyTlnb1IY5R8p1K69couobceFCbFLhHPSPShrq9QFxGb/ZzkuLLvM9mMQNPxO6yV5 cISFisfXVVzhsw//OvO+6U4GpPXQDPNsRCElS15o4yqw6BE5zEsFVy8YOeQHug6yLEAu fnpVVl4u0iyYIBHwgq0EAsNAiwqsylchJjV1pHimcwm8MVbuFe8MUNp5gqGE+zyE+EKT 8t7tSRB0l3px2h0WZO0hHMS8Y90wNxD2TvN/Ps5w01LtDNFMUHuWlm9+Hp0PGJodSHy0 Ms40iRB8JITDuqRIbYGFASE7dwYV3P9RM5RWE9TkgKB0La6Vv6B/HUKP/j2fabLaOrOd cSbw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ItM+Iu1qenI4Asn3N+2BGwmWBIaMxDGBPbjt9fpGqnQ=; b=GnEey4tBtkeyS/xh8gQnM6btQusEgE/HpG1Fp02dVrM1XaNq3wk5MucLHjBny6ZZWr AF70/Qx6zd4t5OGVtt97bbZky5omN03HmY+tnf18iQ/10ZUOYV/eIRgR1b8danqAfc1D kT+V47szHkwCw0CXEUTE1ICH2hvVMwWWmxQj3DeCbBetnkZMJM+fhcrlI8DzZAMBP1pM pqnHGi7ivbA0jC8VBrh+X0zaYj994Pl3XSG4SyJR5up7HuxvT7HKltuTSgAR3SL6RW+J x+6qgA9Rvq3uI48d6Er7N6jJdpOwwnZwZlsKOp8ueTHl6e9iXYX8bYjYXpaBM4jEQmD/ uqqQ== X-Gm-Message-State: AFqh2kofi7kCKTXjLC8Ga62ahT9AkmVeTJpiMfMrSk2sK5JmjmNT7i2T B5eTolgu546ZQANsAirbPNTCtpdjfAknl1Rw X-Received: by 2002:a05:600c:3ca8:b0:3d9:e8b3:57fa with SMTP id bg40-20020a05600c3ca800b003d9e8b357famr4610956wmb.30.1673265727223; Mon, 09 Jan 2023 04:02:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id he12-20020a05600c540c00b003d9ddc82450sm10914942wmb.45.2023.01.09.04.02.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 2/5] hw/microblaze/petalogix: Add FLASH_SECTOR_SIZE definitions Date: Mon, 9 Jan 2023 13:01:51 +0100 Message-Id: <20230109120154.2868-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 3 ++- hw/microblaze/petalogix_s3adsp1800_mmu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index a24fadddca..1888900156 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -45,6 +45,7 @@ #define LMB_BRAM_SIZE (128 * KiB) #define FLASH_SIZE (32 * MiB) +#define FLASH_SECTOR_SIZE (64 * KiB) #define BINARY_DEVICE_TREE_FILE "petalogix-ml605.dtb" @@ -107,7 +108,7 @@ petalogix_ml605_init(MachineState *machine) * 10th paremeter 0 means little-endian */ pflash_cfi01_register(FLASH_BASEADDR, "petalogix_ml605.flash", FLASH_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, 2, 0x89, 0x18, 0x0000, 0x0, 0); + FLASH_SECTOR_SIZE, 2, 0x89, 0x18, 0x0000, 0x0, 0); dev = qdev_new("xlnx.xps-intc"); diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 9d959d1ad8..d14eff2514 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -40,6 +40,7 @@ #define LMB_BRAM_SIZE (128 * KiB) #define FLASH_SIZE (16 * MiB) +#define FLASH_SECTOR_SIZE (64 * KiB) #define BINARY_DEVICE_TREE_FILE "petalogix-s3adsp1800.dtb" @@ -87,7 +88,7 @@ petalogix_s3adsp1800_init(MachineState *machine) pflash_cfi01_register(FLASH_BASEADDR, "petalogix_s3adsp1800.flash", FLASH_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1); + FLASH_SECTOR_SIZE, 1, 0x89, 0x18, 0x0000, 0x0, 1); dev = qdev_new("xlnx.xps-intc"); qdev_prop_set_uint32(dev, "kind-of-intr", From patchwork Mon Jan 9 12:01:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640643 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2117909pvb; Mon, 9 Jan 2023 04:59:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXvp7fAyFCNUNRIBa8GDtKGd3ij7cgf9kX4+wyyA3RkFWhwTBXia+uoqQ73ZFIBld5V3g0Aj X-Received: by 2002:a05:622a:1e85:b0:3a6:8b3a:6450 with SMTP id bz5-20020a05622a1e8500b003a68b3a6450mr110780443qtb.54.1673269177530; Mon, 09 Jan 2023 04:59:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673269177; cv=none; d=google.com; s=arc-20160816; b=nB3WXsxQBcAQi36zqaQMVJK0xtryDLkLwHTKISSy6EPfcEDZi8cqOxl4FqmEvjN0sC 5daxPlWERb6nQ67JIwGTgZpoE76tVg4g7ZJkry1n28rc0c00HQm5fbwLavP0QGdhBSAa qDgKumX3+5ukUHvtJW191Hb0lEnwuaOCn2DPnm1BEuh3INRq0MSWCy5aj3St5nt8N5yr USdPKVcswvKo/IW45MgFuk7t1kYwFEhS+8//A5BW8yBWEUVYE1SuKHhPnp6h8WqMzC9A QWNgufTaCvdqv3xkZJb8AAYN59t3NV67qEVpCU3AAA5FMh5OGKNV5pSrHtKJRhJEgDP1 7vLQ== 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:cc:to :from:dkim-signature; bh=TvirG+eigIopPOcx2cPrBXxTDVIETYN2my256Wba2R8=; b=aw0Df0bxRxwRIiZXFgfR8Yx+0S+9SOqCXg0RlBG9Mdsk9s3mFd14M/v8jLIrEKx0AJ 1Fud5zqb1MkjxC8kDMj6V0pd74D3XMgioR7eMOrOi/YwoykuRGAVcJmrmrSCaWz1z/ce vy8cOLHYFui+oQv9PYQtHTQPZUjxBViguqVUj0bab+WeiqYJfj6pyPDgHBysE60vEhU1 SkXNAjjuLQuKfQEWfTjGX91JjrJ9iruXHjy0L3fSONMK1rL+xnE47VS4v6y7WqrSUGIQ 4A/6gHem7ttWXkNu2/lMHY/Ijx+LSKpYoojZS501MowB17cdPK7iMDv9ORJd0wPdusQu ufJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NOg7+6kn; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jr42-20020a05622a802a00b003ad55e2f3e8si1318189qtb.413.2023.01.09.04.59.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:59:37 -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=NOg7+6kn; 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 ) id 1pEqr4-0005vg-LO; Mon, 09 Jan 2023 07:02:18 -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 ) id 1pEqr1-0005ub-Fh for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:15 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqqz-00023H-UG for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:15 -0500 Received: by mail-wm1-x333.google.com with SMTP id i17-20020a05600c355100b003d99434b1cfso6503035wmq.1 for ; Mon, 09 Jan 2023 04:02:13 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TvirG+eigIopPOcx2cPrBXxTDVIETYN2my256Wba2R8=; b=NOg7+6knm0CCQUleysD4aDkuoTjxSl7z9cZ2+DcygWil0uXACfG7ia2ai8B5IviQnx /X/aaCcJzDltuBjxJ4aXgeMxRE+QrO9iKpf3pm2kUXgOtoNYPlSmqM4hn2FusOnDDhCE DwJlj13j9tRAuw20IvYm5axZ1b3rsloLEoJr5BBbfjjTljKfoKpiPHLIArmzMIsUfWMT JbpUe/pT3nGHJHr+dPTadR2Q1U2SpeQoUtmMpD4QN0jYba9cB148/bSWef5WBybs8fBV Erfv3NZsJThtosyeE+MslPqThUPHynwo/XzfiEJsGIyRT4YzxLvGnRkL8C6p4wNO07LT gaxw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TvirG+eigIopPOcx2cPrBXxTDVIETYN2my256Wba2R8=; b=p+hS4TH+0ZiFAGeA3QxBKg1nP6FmFZscAYZT7A9T8JO+APBbMeAKZEr7//JwPohE8e KuPUZr8IkUlfwM+i/lOTT9w6B2u16AaFNFIYJcpzMGNcwKmW6k3P5gab/NZT6z+J0CdJ zCuOO3zbipU2rZpu6ZhRsCsne64gy0aOpWE1osdnOELD9CC7Ib5N/g/wLk0ss9WjkOTs EUzV0XYlHlOBbeuWGXPLngIkhuXQ1CyGu6V8cEpxJt/9dohR5dCkifm9Z6D2F/VDA71F f/jKUzGvtwh6I1nQ1P+XCUqUXw1mS3bIevzxVDp7jzW8goCnMrJGwr78Oz7eZMDDr1TC II3g== X-Gm-Message-State: AFqh2kolfeYd9IjIwTgWnMgRvlcO7g7ueagai9vhx173jw5mrIgK0LMy c9E104N5vtc1dmTppvGpCEtrk8dTMjF26VE+ X-Received: by 2002:a05:600c:3d12:b0:3d2:392b:3165 with SMTP id bh18-20020a05600c3d1200b003d2392b3165mr45822556wmb.12.1673265732392; Mon, 09 Jan 2023 04:02:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p3-20020a05600c358300b003d1f2c3e571sm17369906wmq.33.2023.01.09.04.02.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 3/5] hw/mips/malta: Add the FLASH_SECTOR_SIZE definition Date: Mon, 9 Jan 2023 13:01:52 +0100 Message-Id: <20230109120154.2868-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Ease code review by using the IEC binary prefix definition for the FLASH_SIZE. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index c0a2e0ab04..e645ba1322 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -69,7 +69,8 @@ #define FPGA_ADDRESS 0x1f000000ULL #define RESET_ADDRESS 0x1fc00000ULL -#define FLASH_SIZE 0x400000 +#define FLASH_SIZE (4 * MiB) +#define FLASH_SECTOR_SIZE (64 * KiB) typedef struct { MemoryRegion iomem; @@ -1289,7 +1290,7 @@ void mips_malta_init(MachineState *machine) fl = pflash_cfi01_register(FLASH_ADDRESS, "mips_malta.bios", FLASH_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 65536, + FLASH_SECTOR_SIZE, 4, 0x0000, 0x0000, 0x0000, 0x0000, be); bios = pflash_cfi01_get_memory(fl); fl_idx++; From patchwork Mon Jan 9 12:01:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640633 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2105475pvb; Mon, 9 Jan 2023 04:31:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXvBV3vvObOBCsG8ezuVPtxfY7gsfGinWkuvOtMzfKs4MrAB6nIklmvmbB+jaD7l4APpRL9D X-Received: by 2002:ac8:44a4:0:b0:3ad:c2d2:783c with SMTP id a4-20020ac844a4000000b003adc2d2783cmr2514851qto.34.1673267471810; Mon, 09 Jan 2023 04:31:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673267471; cv=none; d=google.com; s=arc-20160816; b=h0Jac7OGnVwDPx9sB92eus00ux9aCu4GQXOXquVfxcksHNEaIEZx6TAr7hIxW47jEi quf+UeKvoGdZ2/FmR0hVgpfEUGxAgceVJ0rt74BHeWezUbkH1bTN4v9ZnKlAKPQGc9Kd Fg06CfSoOYsWOHTCYu/bSPmoCQbegDgza5sDXoSR3qTuGqnyg9es4UVwG4u0xFAWqdfF 4ACACwW4AWTsJXfOVbThdsPvB8Im8gQGP2YHxjFEv0/u90kXje5c+YZFrSSPVkj5rUoY FQGhtxj1LcR3lm1k4Fq740BJK/CgSJUZv/eH+jdCTAMgTup9xxbcqfpzSPDRBQYT7VTU ZYdA== 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:cc:to :from:dkim-signature; bh=wxm/+ae/RexNrDFlylFgft3ctCQnO2vjWs01C2V9H4w=; b=a5Sm2JB+d/LigHMI1Jw1+bUOI2EV7k+n2t8IIqcWmg1mxnGPa4Sr23vpaqzPuIUhAf H3HVGETIRMwtQU2ZCyAYiRemt1cTyjUNPV6IUTIfrgAsDv4IBrnrA/ixgOVaAUSQAFzn 5G3py5wUzD/8Q81C947nwgN6/3wx1xiO2F0aCagCcKJahRyxIM11FqhRa7BpKPetRhbl 0vb1klygyWSIeOPtuK+9OhD10R8LSc1ue4oy0+eVKG1upi2NoEZ4MJUhUpjQYHKaX81F Bgcb314l9J7Gh0/o4NxkQpKiM7/Drw+rcLFG84JSDVprYES6KS0GxCnHU1lCMFNYWVx0 BJZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HJgCg+9A; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x10-20020a05622a000a00b003ac35eb41aesi2437051qtw.757.2023.01.09.04.31.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:31:11 -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=HJgCg+9A; 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 ) id 1pEqrA-0005xN-CJ; Mon, 09 Jan 2023 07:02:24 -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 ) id 1pEqr7-0005wX-Lo for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:21 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqr5-00025Z-0R for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:21 -0500 Received: by mail-wm1-x32c.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so8821510wmb.2 for ; Mon, 09 Jan 2023 04:02:18 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wxm/+ae/RexNrDFlylFgft3ctCQnO2vjWs01C2V9H4w=; b=HJgCg+9AWdllygcaF4GGLwC8Jz61t2+TAgtvzWUxVW5C6Pi4X/Ho94vBwgr9CFeMqZ h2qLaXeLq8pknFKWg74wjPZDJiVxdhOaVRbj6ltrAt5BYMhQn65mu4Ke8usNuUsk7rEe UL+eUw8dEmV6656wxfp2vL900/Y3La1bM2CmDC6mXyQG8YDQGsTRdfkbhfVyLxxDf+JO 1p19wxOw4jOWfNI6qAeGSPmyNbWMGkDokEVBBx+re2BrFDtO30CLVAICnSuhIzkyBLOQ WxrKePYIXMjUVR6uS3F+PNhfMhGMg/Zj/q6TmCn1SdlErQmCE28WZXC5JzmlEO/hMUj7 QMhw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wxm/+ae/RexNrDFlylFgft3ctCQnO2vjWs01C2V9H4w=; b=v4h7i7lLzlqs7mdWtaDzjTR76Ah3HSiUTTCMTZ8UHyNiZrQ9hMo3+DjQH7jAhC9LVp QFVb9vG4+9/Dc8MTnTXi1r5la2yISR/nrQ2YEZeHEzHD9N2cd4twcBMl2/Etb/l6cI1f jrLnSjgICzkdES0+KDUDpPbwjGM0QS67ZxJ7PxRy2Tk8SGUaFSjMq3cIdDEziI/RbyqX BpUSweMXQZNmgCiXX9dTeaduzt3adwh5d2AmSQ9DpLH5f1jXqe/oqhxaj4tIyBg5fh6m KQasSqwIsH2aeHjXLeVNDQniX2sYEuDoHzUpNvRc6ZBS1dFq8Z76WMUy0PU0RvLvusVM wwmw== X-Gm-Message-State: AFqh2krfgUclsmWmdBRw/KuO05/r5msZUfADQFrW5hw/6uxDV3CurAVd 2GKhFg9LnrkUHIH1YZTUfp2ejl8bLiLPqWdR X-Received: by 2002:a05:600c:4f55:b0:3d3:5166:2da4 with SMTP id m21-20020a05600c4f5500b003d351662da4mr45690040wmq.8.1673265737455; Mon, 09 Jan 2023 04:02:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id g6-20020adff406000000b00298d87b6309sm8459169wro.78.2023.01.09.04.02.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 4/5] hw/sh4/r2d: Use the IEC binary prefix definitions Date: Mon, 9 Jan 2023 13:01:53 +0100 Message-Id: <20230109120154.2868-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org IEC binary prefixes ease code review: the unit is explicit. Signed-off-by: Philippe Mathieu-Daudé --- hw/sh4/r2d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 39fc4f19d9..b3667e9b12 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -47,10 +47,10 @@ #define FLASH_BASE 0x00000000 #define FLASH_SIZE (16 * MiB) -#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */ -#define SDRAM_SIZE 0x04000000 +#define SDRAM_BASE (192 * MiB) /* Physical location of SDRAM: Area 3 */ +#define SDRAM_SIZE (64 * MiB) -#define SM501_VRAM_SIZE 0x800000 +#define SM501_VRAM_SIZE (8 * MiB) #define BOOT_PARAMS_OFFSET 0x0010000 /* CONFIG_BOOT_LINK_OFFSET of Linux kernel */ From patchwork Mon Jan 9 12:01:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640623 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2101882pvb; Mon, 9 Jan 2023 04:22:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEk/tW55SLs0fXQ7rBTJGTYQeJHobIPBslTJxvO3jyYAnbKNqR0sg66auqUKFbyTNKLQVJ X-Received: by 2002:a1f:ac8f:0:b0:3d5:61f3:d0b6 with SMTP id v137-20020a1fac8f000000b003d561f3d0b6mr24814173vke.9.1673266947361; Mon, 09 Jan 2023 04:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673266947; cv=none; d=google.com; s=arc-20160816; b=LnrybJ5A661OkT5XhFnTTrK6W5byE4B/tEnRfaFCmnZE/ninomg2z1qgu6AveaRaf2 xXaRxsSJC7H12mHL6fkOHyljw/HscWDPDyg3jKiG2e3EeOcAhAXa/D0UNOR9MsFn+OFZ CAoQNT3QUt+4GtW/xtzkDMFtOTjJ7wIjgy9N8r4OxuooXP5DjGnUaujvUOXASE30H5Az BFYLNHX+Orfw2KpsJjxO199CWh6lFIW0rJqJSnBPUtlc65BM0DV2XhJrk3dgkhf+S0qr MsFrKzm46Nk/36Cqv8aHPm4B8+fk3Etglcaxk8sLTS0mnkCJVpMxrEnGaBZG4JyOwLnl RsAw== 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:cc:to :from:dkim-signature; bh=fmB1uKPq6eeUbQCXeOn2PhOUbWdoWpaNbipdtr7rTeo=; b=YrHi/puSYSMdZLu/RE5hQsORCOJ7GxYtY0lQ68DfBwE780TFwAb28Sf1sGP56EbzGl EDYsPNLzg6TvD1EUAXVLMvKMkO3XUGpnAhhBCyzaK82kRxFcKV9r1/DELPKZcFzNWFtx F/+xim3FqBLfbb/jQlwyV3zsq3U/ArSrEa/fc/3qYRfhpkN0qMp8UFp5q6yZW37LyOd7 W0D7gQTcUz5XatwflgkuhPaODR+3nUWWB765WjozW/FqghA3sYxgMC83WuCe2NGs3P/s 5c8GdJJC/XvISiZqCtZM/69c2L51c5Jxa2GhXV2V9caxaQHudkqT9iDJypdpH36tpgN4 5yxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=av8OZnqq; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g6-20020a05620a278600b0070263eaca87si4494329qkp.386.2023.01.09.04.22.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 04:22:27 -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=av8OZnqq; 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 ) id 1pEqrD-0005yh-2J; Mon, 09 Jan 2023 07:02:27 -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 ) id 1pEqrA-0005xj-S5 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:25 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEqr9-0001uW-AJ for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:02:24 -0500 Received: by mail-wm1-x32b.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso2312923wms.4 for ; Mon, 09 Jan 2023 04:02:22 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fmB1uKPq6eeUbQCXeOn2PhOUbWdoWpaNbipdtr7rTeo=; b=av8OZnqqWP4e2jgZ/NumwW5XBeP283hJ5cUhHKOkiGmvYVdmsAaItK2AO9F6Qxv0WJ EA8Om+FFfGBtS+UMSL6+CLE6h/z+WvT5e2hF8gx9m0q1YlWZYNxWiHGHuS5xaFqanTtV lbbnUYKmC1hMQ/0IRk33pk7Y4nHOgNEhHMmdnEc5n5ErZeK4YXvysx0qEKMpkY7xgrwx 876moaYMDDsbsh1Ig19lcyhMnvwF0T3pryDjT69pq7XpoVLTYv/tqGX7BokZ9Fg9KXJ0 mTwdhN+vkxa6Kex4X7iWSZva7xabYuwoqUbATNWLOpvGB+68kRRzPq7qFXgXEiXEKnLG qPPQ== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fmB1uKPq6eeUbQCXeOn2PhOUbWdoWpaNbipdtr7rTeo=; b=RE5u/IItHUBVtHvIZR65eiYH6Tlue16O5cZoNP+2fw5lffFU83cvM8RvfGF6xAozMY qcY5xECLDZMbAlebfKGKHdc8ikadubMbsGnoghmPN4Ks/qLQN7tmYdmOH9dC6APXpg+K HYR/zAOTxmYWQZmposNd9pRmPChGTBTMUrt+tD2C8UtYn3ErwQf/18PIK3v/ZWh4IHKG mi/MDNyLbmjJJZTQvvD3xlRN18KAyzgrZwwURamN5fak50ifGAFA4X7CEtI1K2XwVbJh eeaBLf8xytItQT0Q9gDAIh4s2O7cIDwvhZvH/6oGbgghdVpZfJV0ddyZeESrvr2WjSBC JPKQ== X-Gm-Message-State: AFqh2kpTOO/4rgh+ReYEWGDhkrxaV86GFLPNVAlbMphMmJERDF4FJoua OpPw3y+estEaeyCyeY7rmx+TQPmxpZq/XWSV X-Received: by 2002:a7b:c3c9:0:b0:3d2:e28:647f with SMTP id t9-20020a7bc3c9000000b003d20e28647fmr55589126wmj.15.1673265742355; Mon, 09 Jan 2023 04:02:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id r7-20020a05600c458700b003d974076f13sm11928490wmo.3.2023.01.09.04.02.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 04:02:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Yoshinori Sato , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Jiaxun Yang , Magnus Damm , qemu-ppc@nongnu.org, BALATON Zoltan Subject: [PATCH 5/5] hw/sh4/r2d: Add the FLASH_SECTOR_SIZE definition Date: Mon, 9 Jan 2023 13:01:54 +0100 Message-Id: <20230109120154.2868-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109120154.2868-1-philmd@linaro.org> References: <20230109120154.2868-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- hw/sh4/r2d.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index b3667e9b12..6e0c65124a 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -45,7 +45,8 @@ #include "hw/block/flash.h" #define FLASH_BASE 0x00000000 -#define FLASH_SIZE (16 * MiB) +#define FLASH_SIZE (16 * MiB) +#define FLASH_SECTOR_SIZE (128 * KiB) #define SDRAM_BASE (192 * MiB) /* Physical location of SDRAM: Area 3 */ #define SDRAM_SIZE (64 * MiB) @@ -304,8 +305,8 @@ static void r2d_init(MachineState *machine) dinfo = drive_get(IF_PFLASH, 0, 0); pflash_cfi02_register(0x0, "r2d.flash", FLASH_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, 1, 2, 0x0001, 0x227e, 0x2220, 0x2200, - 0x555, 0x2aa, 0); + FLASH_SECTOR_SIZE, 1, 2, + 0x0001, 0x227e, 0x2220, 0x2200, 0x555, 0x2aa, 0); /* NIC: rtl8139 on-board, and 2 slots. */ for (i = 0; i < nb_nics; i++)