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++)