[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 09/11] mips_malta: Clean up definition of flash mem
From: |
Markus Armbruster |
Subject: |
[Qemu-ppc] [PATCH v2 09/11] mips_malta: Clean up definition of flash memory size somewhat |
Date: |
Tue, 26 Feb 2019 20:34:06 +0100 |
pflash_cfi01_register() takes a size in bytes, a block size in bytes
and a number of blocks. mips_malta_init() passes BIOS_SIZE, 65536,
FLASH_SIZE >> 16. Actually consistent only because BIOS_SIZE (defined
in include/hw/mips/bios.h as (4 * MiB)) matches FLASH_SIZE (defined
locally as 0x400000). Confusing all the same.
Pass FLASH_SIZE instead of BIOS_SIZE.
There are more uses of BIOS_SIZE, but I don't sufficiently understand
them to attempt cleanup.
Cc: Aurelien Jarno <address@hidden>
Cc: Aleksandar Rikalo <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/mips/mips_malta.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 172ee033af..c2a5c65a24 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1269,12 +1269,12 @@ void mips_malta_init(MachineState *machine)
if (dinfo) {
printf("Register parallel flash %d size " TARGET_FMT_lx " at "
"addr %08llx '%s' %x\n",
- fl_idx, bios_size, FLASH_ADDRESS,
+ fl_idx, FLASH_SIZE, FLASH_ADDRESS,
blk_name(dinfo->bdrv), fl_sectors);
}
#endif
fl = pflash_cfi01_register(FLASH_ADDRESS, NULL, "mips_malta.bios",
- BIOS_SIZE,
+ FLASH_SIZE,
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
65536, fl_sectors,
4, 0x0000, 0x0000, 0x0000, 0x0000, be);
--
2.17.2
- [Qemu-ppc] [PATCH v2 00/11] pflash: Fixes and cleanups, Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 03/11] pflash_cfi01: Log use of flawed "write to buffer", Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 02/11] pflash_cfi01: Do not exit() on guest aborting "write to buffer", Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 09/11] mips_malta: Clean up definition of flash memory size somewhat,
Markus Armbruster <=
- [Qemu-ppc] [PATCH v2 06/11] sam460ex: Don't size flash memory to match backing image, Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 05/11] hw: Use PFLASH_CFI0{1, 2} and TYPE_PFLASH_CFI0{1, 2}, Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 07/11] ppc405_boards: Don't size flash memory to match backing image, Markus Armbruster, 2019/02/26
- [Qemu-ppc] [PATCH v2 04/11] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*, Markus Armbruster, 2019/02/26