From 9e422c3c05fdd324565049b09be27c446f9dc0ca Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 14 Jan 2021 01:29:08 -0700 Subject: 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 Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 Reviewed-by: Jack Rosenthal Reviewed-by: Simon Glass Reviewed-by: Tom Hughes Commit-Queue: Jack Rosenthal --- chip/stm32/config-stm32f09x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chip/stm32/config-stm32f09x.h') diff --git a/chip/stm32/config-stm32f09x.h b/chip/stm32/config-stm32f09x.h index 3da8a342f2..9dc27a1fb2 100644 --- a/chip/stm32/config-stm32f09x.h +++ b/chip/stm32/config-stm32f09x.h @@ -8,7 +8,7 @@ * Flash physical size: 256KB * Write protect sectors: 31 4KB sectors, one 132KB sector */ -#define CONFIG_FLASH_SIZE 0x00040000 +#define CONFIG_FLASH_SIZE_BYTES 0x00040000 #define CONFIG_FLASH_BANK_SIZE 0x1000 #define CONFIG_FLASH_ERASE_SIZE 0x0800 /* erase bank size */ #define CONFIG_FLASH_WRITE_SIZE 0x0002 /* minimum write size */ @@ -62,7 +62,7 @@ #define CONFIG_EC_PROTECTED_STORAGE_OFF 0 #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 - \ +#define CONFIG_EC_WRITABLE_STORAGE_SIZE (CONFIG_FLASH_SIZE_BYTES - \ CONFIG_EC_WRITABLE_STORAGE_OFF) #define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF -- cgit v1.2.1