summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-09-22 18:44:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-24 18:07:01 -0700
commit854d5a6e7fa47e44797891e6fad392a344003b46 (patch)
tree5a2fd4137eb9660ef5c4d459b88d20f987498fd7 /include
parent324d6b807f18c456c16dad534f88ef22da34fdc5 (diff)
downloadchrome-ec-854d5a6e7fa47e44797891e6fad392a344003b46.tar.gz
cleanup: Remove CONFIG_FW_IMAGE_SIZE
Since CONFIG_RO_SIZE and CONFIG_RW_SIZE now exist (which may theoretically be different sizes), it is no longer useful to globally define the size of an image. BUG=chromium:535027 BRANCH=None TEST=`make buildall -j`. Also, verify glados / glados_pd continue to function as expected. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ie29959923bc5d02b4d7d6d507ff2191bcb7d24c8 Reviewed-on: https://chromium-review.googlesource.com/301743 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h1
-rw-r--r--include/config_std_internal_flash.h22
2 files changed, 13 insertions, 10 deletions
diff --git a/include/config.h b/include/config.h
index 5e3a78e345..1094c89f11 100644
--- a/include/config.h
+++ b/include/config.h
@@ -774,7 +774,6 @@
/*****************************************************************************/
/* Firmware region configuration */
-#undef CONFIG_FW_IMAGE_SIZE
#undef CONFIG_FW_PSTATE_OFF
#undef CONFIG_FW_PSTATE_SIZE
diff --git a/include/config_std_internal_flash.h b/include/config_std_internal_flash.h
index cfe31773ea..4b722f86d9 100644
--- a/include/config_std_internal_flash.h
+++ b/include/config_std_internal_flash.h
@@ -33,34 +33,38 @@
*/
/*
+ * Size of one firmware image in flash - half for RO, half for RW.
+ * This is NOT a globally defined config, and is only used in this file
+ * for convenience.
+ */
+#define _IMAGE_SIZE ((CONFIG_FLASH_SIZE - \
+ CONFIG_SHAREDLIB_SIZE) / 2)
+
+/*
* The EC uses the one bank of flash to emulate a SPI-like write protect
* register with persistent state.
*/
#define CONFIG_FLASH_PSTATE
#define CONFIG_FW_PSTATE_SIZE CONFIG_FLASH_BANK_SIZE
-#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_SIZE - \
- CONFIG_SHAREDLIB_SIZE) / 2)
+#define CONFIG_FW_PSTATE_OFF (_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE)
/*
* By default, there is no shared objects library. However, if configured, the
* shared objects library will be placed after the RO image.
*/
#define CONFIG_SHAREDLIB_MEM_OFF (CONFIG_RO_MEM_OFF + \
- CONFIG_FW_IMAGE_SIZE)
+ _IMAGE_SIZE)
#define CONFIG_SHAREDLIB_STORAGE_OFF (CONFIG_RO_STORAGE_OFF + \
- CONFIG_FW_IMAGE_SIZE)
+ _IMAGE_SIZE)
#define CONFIG_SHAREDLIB_SIZE 0
#define CONFIG_RO_MEM_OFF 0
#define CONFIG_RO_STORAGE_OFF 0
-#define CONFIG_RO_SIZE (CONFIG_FW_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE)
+#define CONFIG_RO_SIZE (_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE)
#define CONFIG_RW_MEM_OFF (CONFIG_SHAREDLIB_MEM_OFF + \
CONFIG_SHAREDLIB_SIZE)
#define CONFIG_RW_STORAGE_OFF 0
-#define CONFIG_RW_SIZE CONFIG_FW_IMAGE_SIZE
+#define CONFIG_RW_SIZE _IMAGE_SIZE
#define CONFIG_EC_PROTECTED_STORAGE_OFF 0
#define CONFIG_EC_PROTECTED_STORAGE_SIZE CONFIG_RW_MEM_OFF