diff options
author | Yuval Peress <peress@chromium.org> | 2021-01-14 01:29:08 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 04:07:55 +0000 |
commit | 9e422c3c05fdd324565049b09be27c446f9dc0ca (patch) | |
tree | b4694ca5abc8c1be1000a1efe7a7bd8a02ddd856 /chip/stm32/config-stm32h7x3.h | |
parent | 6aa3d78608b681e6374f30747a7f6ab80938bde6 (diff) | |
download | chrome-ec-9e422c3c05fdd324565049b09be27c446f9dc0ca.tar.gz |
Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTES
In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used
throughout. The issue is that the units don't match. In
Zephyr the value is in KiB instead of bytes. This refactor
simply renames CONFIG_FLASH_SIZE in platform/ec to include
the unit (via _BYTES).
BRANCH=none
BUG=b:174873770
TEST=make buildall
be generated by the build instead of per board
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/stm32/config-stm32h7x3.h')
-rw-r--r-- | chip/stm32/config-stm32h7x3.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/stm32/config-stm32h7x3.h b/chip/stm32/config-stm32h7x3.h index 399e6a6f1a..da94b09069 100644 --- a/chip/stm32/config-stm32h7x3.h +++ b/chip/stm32/config-stm32h7x3.h @@ -4,7 +4,7 @@ */ /* Memory mapping */ -#define CONFIG_FLASH_SIZE (2048 * 1024) +#define CONFIG_FLASH_SIZE_BYTES (2048 * 1024) #define CONFIG_FLASH_ERASE_SIZE (128 * 1024) /* erase bank size */ /* always use 256-bit writes due to ECC */ #define CONFIG_FLASH_WRITE_SIZE 32 /* minimum write size */ @@ -32,7 +32,7 @@ #define CONFIG_RO_MEM_OFF 0 #define CONFIG_RO_SIZE (128 * 1024) -#define CONFIG_RW_MEM_OFF (CONFIG_FLASH_SIZE / 2) +#define CONFIG_RW_MEM_OFF (CONFIG_FLASH_SIZE_BYTES / 2) #define CONFIG_RW_SIZE (512 * 1024) #define CONFIG_RO_STORAGE_OFF 0 @@ -42,7 +42,7 @@ #define CONFIG_EC_PROTECTED_STORAGE_SIZE CONFIG_RW_MEM_OFF #define CONFIG_EC_WRITABLE_STORAGE_OFF CONFIG_RW_MEM_OFF #define CONFIG_EC_WRITABLE_STORAGE_SIZE \ - (CONFIG_FLASH_SIZE - CONFIG_EC_WRITABLE_STORAGE_OFF) + (CONFIG_FLASH_SIZE_BYTES - CONFIG_EC_WRITABLE_STORAGE_OFF) #define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF #define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE |