summaryrefslogtreecommitdiff
path: root/common/spi_flash_reg.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-09-07 14:12:57 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-16 14:49:33 -0700
commitfe77303bec6c78786a9df1dbdb33af64787e20c8 (patch)
tree772d2fbb53178121ddca0dfbafbd304ee075ce1b /common/spi_flash_reg.c
parent1167cad6a88e45bbf6a5599f19d018cd6a8b5233 (diff)
downloadchrome-ec-fe77303bec6c78786a9df1dbdb33af64787e20c8.tar.gz
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 <shawnn@chromium.org> Change-Id: I18a34a943e02c8a029f330f213a8634a2ca418b6 Reviewed-on: https://chromium-review.googlesource.com/297824 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Mulin Chao <mlchao@nuvoton.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/spi_flash_reg.c')
-rw-r--r--common/spi_flash_reg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spi_flash_reg.c b/common/spi_flash_reg.c
index 9ee814bbe3..00041fb099 100644
--- a/common/spi_flash_reg.c
+++ b/common/spi_flash_reg.c
@@ -144,7 +144,7 @@ int spi_flash_protect_to_reg(unsigned int start, unsigned int len, uint8_t *sr1,
return EC_ERROR_INVAL;
/* Invalid data */
- if ((start && !len) || start + len > CONFIG_SPI_FLASH_SIZE)
+ if ((start && !len) || start + len > CONFIG_FLASH_SIZE)
return EC_ERROR_INVAL;
for (i = 0; i < ARRAY_SIZE(spi_flash_protect_ranges); ++i) {