From fe77303bec6c78786a9df1dbdb33af64787e20c8 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Mon, 7 Sep 2015 14:12:57 -0700 Subject: cleanup: Remove redundant FLASH_SIZE CONFIGs Since there is no more concept of a flash region belonging only to the EC, we only need one FLASH_SIZE config, which represents the actual physical size of flash. BRANCH=None BUG=chrome-os-partner:23796 TEST=With entire patch series, on both Samus and Glados: - Verify 'version' EC console command is correct - Verify 'flashrom -p ec -r read.bin' reads back EC image - Verify software sync correctly flashes both EC and PD RW images Signed-off-by: Shawn Nematbakhsh Change-Id: I18a34a943e02c8a029f330f213a8634a2ca418b6 Reviewed-on: https://chromium-review.googlesource.com/297824 Commit-Ready: Shawn N Tested-by: Mulin Chao Reviewed-by: Randall Spangler --- include/config.h | 4 ---- include/config_std_internal_flash.h | 3 +-- include/flash.h | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index c903a92758..6cd20f3ca8 100644 --- a/include/config.h +++ b/include/config.h @@ -705,7 +705,6 @@ */ #undef CONFIG_MAPPED_STORAGE_BASE -#undef CONFIG_FLASH_PHYSICAL_SIZE #undef CONFIG_FLASH_PROTECT_NEXT_BOOT /* @@ -1440,9 +1439,6 @@ /* SPI flash part supports SR2 register */ #undef CONFIG_SPI_FLASH_HAS_SR2 -/* Size (bytes) of SPI flash memory */ -#undef CONFIG_SPI_FLASH_SIZE - /* SPI master feature */ #undef CONFIG_SPI_MASTER diff --git a/include/config_std_internal_flash.h b/include/config_std_internal_flash.h index 35561a59da..ad97110547 100644 --- a/include/config_std_internal_flash.h +++ b/include/config_std_internal_flash.h @@ -48,9 +48,8 @@ #define CONFIG_FW_PSTATE_OFF (CONFIG_FW_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE) /* Size of one firmware image in flash */ -#define CONFIG_FW_IMAGE_SIZE ((CONFIG_FLASH_PHYSICAL_SIZE - \ +#define CONFIG_FW_IMAGE_SIZE ((CONFIG_FLASH_SIZE - \ CONFIG_SHAREDLIB_SIZE) / 2) -#define CONFIG_FLASH_SIZE CONFIG_FLASH_PHYSICAL_SIZE /* * By default, there is no shared objects library. However, if configured, the diff --git a/include/flash.h b/include/flash.h index 6117d30025..8d5d1b1c06 100644 --- a/include/flash.h +++ b/include/flash.h @@ -12,7 +12,7 @@ #include "ec_commands.h" /* For EC_FLASH_PROTECT_* flags */ /* Number of physical flash banks */ -#define PHYSICAL_BANKS (CONFIG_FLASH_PHYSICAL_SIZE / CONFIG_FLASH_BANK_SIZE) +#define PHYSICAL_BANKS (CONFIG_FLASH_SIZE / CONFIG_FLASH_BANK_SIZE) /*WP region offset and size in units of flash banks */ #define WP_BANK_OFFSET (CONFIG_WP_STORAGE_OFF / CONFIG_FLASH_BANK_SIZE) -- cgit v1.2.1