qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5] hw/sh4/r2d: Add the FLASH_SECTOR_SIZE definition


From: Philippe Mathieu-Daudé
Subject: [PATCH 5/5] hw/sh4/r2d: Add the FLASH_SECTOR_SIZE definition
Date: Mon, 9 Jan 2023 13:01:54 +0100

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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++)
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]