[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 15/30] hw/lm32: use the BYTE-based definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v2 15/30] hw/lm32: use the BYTE-based definitions |
Date: |
Mon, 5 Mar 2018 08:27:17 -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>
---
hw/lm32/lm32_boards.c | 12 ++++++------
hw/lm32/milkymist.c | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 527bcc229c..15315101be 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -88,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 * K_BYTE;
+ size_t flash_size = 32 * M_BYTE;
hwaddr ram_base = 0x08000000;
- size_t ram_size = 64 * 1024 * 1024;
+ size_t ram_size = 64 * M_BYTE;
hwaddr timer0_base = 0x80002000;
hwaddr uart0_base = 0x80006000;
hwaddr timer1_base = 0x8000a000;
@@ -174,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 * K_BYTE;
+ size_t flash_size = 32 * M_BYTE;
hwaddr ram_base = 0x08000000;
- size_t ram_size = 64 * 1024 * 1024;
+ size_t ram_size = 64 * M_BYTE;
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 c28379399f..b884b825bc 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -36,7 +36,7 @@
#define BIOS_FILENAME "mmone-bios.bin"
#define BIOS_OFFSET 0x00860000
-#define BIOS_SIZE (512*1024)
+#define BIOS_SIZE (512 * K_BYTE)
#define KERNEL_LOAD_ADDR 0x40000000
typedef struct {
@@ -95,10 +95,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 * K_BYTE;
+ size_t flash_size = 32 * M_BYTE;
hwaddr sdram_base = 0x40000000;
- size_t sdram_size = 128 * 1024 * 1024;
+ size_t sdram_size = 128 * M_BYTE;
hwaddr initrd_base = sdram_base + 0x1002000;
hwaddr cmdline_base = sdram_base + 0x1000000;
--
2.16.2
- Re: [Qemu-devel] [PATCH v2 08/30] hw/i386: use the BYTE-based definitions, (continued)
- [Qemu-devel] [PATCH v2 07/30] hw/arm: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 11/30] hw/s390x: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 06/30] hw/mips: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 14/30] hw/alpha: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 13/30] hw/xtensa: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 16/30] hw/sh4: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 10/30] hw/ppc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 15/30] hw/lm32: use the BYTE-based definitions,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v2 17/30] hw/tricore: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 12/30] hw/hppa: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 19/30] hw/nios2: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 18/30] hw/microblaze: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 20/30] hw/cris: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 21/30] hw/misc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 25/30] hw/scsi: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05
- [Qemu-devel] [PATCH v2 24/30] hw/ipack: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/03/05