[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v4 27/40] hw/lm32: Use the IEC binary prefix defin
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v4 27/40] hw/lm32: Use the IEC binary prefix definitions |
Date: |
Sun, 10 Jun 2018 22:14:48 -0300 |
It eases code review, unit is explicit.
Patch generated using:
$ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/
and modified manually.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Michael Walle <address@hidden>
---
hw/lm32/lm32_boards.c | 13 +++++++------
hw/lm32/milkymist.c | 10 +++++-----
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 167058348e..fd8eccca14 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu/error-report.h"
#include "qemu-common.h"
#include "cpu.h"
@@ -87,10 +88,10 @@ static void lm32_evr_init(MachineState *machine)
/* memory map */
hwaddr flash_base = 0x04000000;
- size_t flash_sector_size = 256 * 1024;
- size_t flash_size = 32 * 1024 * 1024;
+ size_t flash_sector_size = 256 * KiB;
+ size_t flash_size = 32 * MiB;
hwaddr ram_base = 0x08000000;
- size_t ram_size = 64 * 1024 * 1024;
+ size_t ram_size = 64 * MiB;
hwaddr timer0_base = 0x80002000;
hwaddr uart0_base = 0x80006000;
hwaddr timer1_base = 0x8000a000;
@@ -173,10 +174,10 @@ static void lm32_uclinux_init(MachineState *machine)
/* memory map */
hwaddr flash_base = 0x04000000;
- size_t flash_sector_size = 256 * 1024;
- size_t flash_size = 32 * 1024 * 1024;
+ size_t flash_sector_size = 256 * KiB;
+ size_t flash_size = 32 * MiB;
hwaddr ram_base = 0x08000000;
- size_t ram_size = 64 * 1024 * 1024;
+ size_t ram_size = 64 * MiB;
hwaddr uart0_base = 0x80000000;
hwaddr timer0_base = 0x80002000;
hwaddr timer1_base = 0x80010000;
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index c36bbc4ae2..321f184595 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu/error-report.h"
#include "qemu-common.h"
#include "cpu.h"
@@ -33,11 +34,10 @@
#include "milkymist-hw.h"
#include "lm32.h"
#include "exec/address-spaces.h"
-#include "qemu/cutils.h"
#define BIOS_FILENAME "mmone-bios.bin"
#define BIOS_OFFSET 0x00860000
-#define BIOS_SIZE (512*1024)
+#define BIOS_SIZE (512 * KiB)
#define KERNEL_LOAD_ADDR 0x40000000
typedef struct {
@@ -96,10 +96,10 @@ milkymist_init(MachineState *machine)
/* memory map */
hwaddr flash_base = 0x00000000;
- size_t flash_sector_size = 128 * 1024;
- size_t flash_size = 32 * 1024 * 1024;
+ size_t flash_sector_size = 128 * KiB;
+ size_t flash_size = 32 * MiB;
hwaddr sdram_base = 0x40000000;
- size_t sdram_size = 128 * 1024 * 1024;
+ size_t sdram_size = 128 * MiB;
hwaddr initrd_base = sdram_base + 0x1002000;
hwaddr cmdline_base = sdram_base + 0x1000000;
--
2.17.1
- [Qemu-trivial] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions, (continued)
- [Qemu-trivial] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 18/40] hw/sparc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 19/40] hw/s390x: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 21/40] hw/xtensa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 22/40] hw/alpha: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 23/40] hw/tricore: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 24/40] hw/microblaze: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 25/40] hw/nios2: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 26/40] hw/cris: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 27/40] hw/lm32: Use the IEC binary prefix definitions,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH v4 28/40] hw/sh4: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 29/40] hw/mips/r4k: Constify params_size, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 30/40] hw/mips: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 32/40] hw/ppc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 34/40] hw/net: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 35/40] hw/usb: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-trivial] [PATCH v4 36/40] hw/sd: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10