qemu-ppc
[Top][All Lists]
Advanced

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

[PATCH 3/5] hw/mips/malta: Add the FLASH_SECTOR_SIZE definition


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

Ease code review by using the IEC binary prefix definition
for the FLASH_SIZE.

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




reply via email to

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