summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-01-21 13:06:58 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-22 20:32:09 +0000
commit35c3160422d5b9e4fd5f6d81034bf44f86b62245 (patch)
tree7b829ac74bea3fa3a1d46439afb090c3d9d59134
parent147e95ad2452b0637481b4418209115269762a94 (diff)
downloadchrome-ec-35c3160422d5b9e4fd5f6d81034bf44f86b62245.tar.gz
flash: remove unused asserts
CL:2325764 modified the common flash support to allow the host to program up to CONFIG_WP_STORAGE_SIZE bytes for the RO image and CONFIG_EC_WRITABLE_STORAGE_SIZE bytes for the RW image. The host always erases the full size reported by the region so the checks of CONFIG_RO_SIZE and CONFIG_RW_SIZE are no longer needed. BUG=b:175115527 BRANCH=volteer TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I446ecf2094e158073354766706d4f486acef1bd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643578 Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r--common/flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/flash.c b/common/flash.c
index ab3cd23df0..9f222f55b0 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -1371,10 +1371,10 @@ DECLARE_HOST_COMMAND(EC_CMD_FLASH_WRITE,
/*
* Make sure our image sizes are a multiple of flash block erase size so that
* the host can erase the entire image.
+ * Note that host (flashrom/depthcharge) does not erase/program the
+ * EC_FLASH_REGION_RO region, it only queries this region.
*/
-BUILD_ASSERT(CONFIG_RO_SIZE % CONFIG_FLASH_ERASE_SIZE == 0);
-BUILD_ASSERT(CONFIG_RW_SIZE % CONFIG_FLASH_ERASE_SIZE == 0);
-BUILD_ASSERT(EC_FLASH_REGION_RO_SIZE % CONFIG_FLASH_ERASE_SIZE == 0);
+BUILD_ASSERT(CONFIG_WP_STORAGE_SIZE % CONFIG_FLASH_ERASE_SIZE == 0);
BUILD_ASSERT(CONFIG_EC_WRITABLE_STORAGE_SIZE % CONFIG_FLASH_ERASE_SIZE == 0);
#endif