diff options
author | David Hendricks <dhendrix@chromium.org> | 2016-08-01 17:59:48 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-02 18:49:52 -0700 |
commit | fdcec72d1ac5591e4a5335e9fc1671e19e6651ac (patch) | |
tree | 784afaa0973fb1c58989a22c085369e240e27df5 /common/spi_flash_reg.c | |
parent | f5ec39ee0f70ec041eb739f931608e6ee1f96860 (diff) | |
download | chrome-ec-fdcec72d1ac5591e4a5335e9fc1671e19e6651ac.tar.gz |
spi_flash: Remove unused write-protect ranges
This removes write-protect ranges that are unnecessary so
that we save a bit of space.
BUG=chromium:633431
BRANCH=none
TEST=compiled only.
Change-Id: Ib34c6a125b001fc92a21f795ac3d922e77143342
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/365210
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/spi_flash_reg.c')
-rw-r--r-- | common/spi_flash_reg.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/common/spi_flash_reg.c b/common/spi_flash_reg.c index 143103c075..f3c372c838 100644 --- a/common/spi_flash_reg.c +++ b/common/spi_flash_reg.c @@ -41,12 +41,7 @@ struct protect_range { static const struct protect_range spi_flash_protect_ranges[] = { { X, X, X, { 0, 0, 0 }, 0, 0 }, /* No protection */ { X, X, 1, { 0, 1, 1 }, 0, 0x40000 }, /* Lower 1/2 */ - { X, X, 1, { 0, 0, 1 }, 0, 0x10000 }, /* Lower 1/8 */ { X, X, 1, { 0, 1, 0 }, 0, 0x20000 }, /* Lower 1/4 */ - { X, X, X, { 1, X, X }, 0, 0x80000 }, /* All protected */ - { X, X, 0, { 0, 0, 1 }, 0x70000, 0x10000 }, /* Upper 1/8*/ - { X, X, 0, { 0, 1, 0 }, 0x60000, 0x20000 }, /* Upper 1/4*/ - { X, X, 0, { 0, 1, 1 }, 0x40000, 0x40000 }, /* Upper 1/2*/ }; #elif defined(CONFIG_SPI_FLASH_W25Q40) @@ -54,58 +49,18 @@ static const struct protect_range spi_flash_protect_ranges[] = { static const struct protect_range spi_flash_protect_ranges[] = { /* CMP = 0 */ { 0, X, X, { 0, 0, 0 }, 0, 0 }, /* No protection */ - { 0, 0, 0, { 0, 0, 1 }, 0x70000, 0x7ffff }, /* Upper 1/8 */ - { 0, 0, 0, { 0, 1, 0 }, 0x60000, 0x7ffff }, /* Upper 1/4 */ - { 0, 0, 0, { 0, 1, 1 }, 0x40000, 0x7ffff }, /* Upper 1/2 */ - { 0, 0, 1, { 0, 0, 1 }, 0, 0x0ffff }, /* Lower 1/8 */ { 0, 0, 1, { 0, 1, 0 }, 0, 0x1ffff }, /* Lower 1/4 */ { 0, 0, 1, { 0, 1, 1 }, 0, 0x3ffff }, /* Lower 1/2 */ - { 0, 0, X, { 1, X, X }, 0, 0x7ffff }, /* All */ - { 0, 1, 0, { 0, 0, 1 }, 0x7f000, 0x7ffff }, /* Upper 1/128 */ - { 0, 1, 0, { 0, 1, 0 }, 0x7e000, 0x7ffff }, /* Upper 1/64 */ - { 0, 1, 0, { 0, 1, 1 }, 0x7c000, 0x7ffff }, /* Upper 1/32 */ - { 0, 1, 0, { 1, 0, X }, 0x78000, 0x7ffff }, /* Upper 1/16 */ - { 0, 1, 0, { 1, 1, 0 }, 0x78000, 0x7ffff }, /* Upper 1/16 */ - { 0, 1, 1, { 0, 0, 1 }, 0, 0x00fff }, /* Lower 1/128 */ - { 0, 1, 1, { 0, 1, 0 }, 0, 0x01fff }, /* Lower 1/64 */ - { 0, 1, 1, { 0, 1, 1 }, 0, 0x03fff }, /* Lower 1/32 */ - { 0, 1, 1, { 1, 0, X }, 0, 0x07fff }, /* Lower 1/16 */ - { 0, 1, 1, { 1, 1, 0 }, 0, 0x07fff }, /* Lower 1/16 */ - { 0, 1, X, { 1, 1, 1 }, 0, 0x7ffff }, /* All */ /* CMP = 1 */ - { 1, X, X, { 0, 0, 0 }, 0, 0x7ffff }, /* All */ - { 1, 0, 0, { 0, 0, 1 }, 0, 0x6ffff }, /* Lower 7/8 */ - { 1, 0, 0, { 0, 1, 0 }, 0, 0x5ffff }, /* Lower 3/4 */ { 1, 0, 0, { 0, 1, 1 }, 0, 0x3ffff }, /* Lower 1/2 */ - { 1, 0, 1, { 0, 0, 1 }, 0x10000, 0x7ffff }, /* Upper 7/8 */ - { 1, 0, 1, { 0, 1, 0 }, 0x20000, 0x7ffff }, /* Upper 3/4 */ - { 1, 0, 1, { 0, 1, 1 }, 0x40000, 0x7ffff }, /* Upper 1/2 */ { 1, 0, X, { 1, X, X }, 0, 0 }, /* None (W25Q40EW only) */ - { 1, 1, 0, { 0, 0, 1 }, 0, 0x7efff }, /* Lower 127/128 */ - { 1, 1, 0, { 0, 1, 0 }, 0, 0x7dfff }, /* Lower 63/64 */ - { 1, 1, 0, { 0, 1, 1 }, 0, 0x7bfff }, /* Lower 31/32 */ - { 1, 1, 0, { 1, 0, X }, 0, 0x77fff }, /* Lower 15/16 */ - { 1, 1, 0, { 1, 1, 0 }, 0, 0x77fff }, /* Lower 15/16 */ - { 1, 1, 1, { 0, 0, 1 }, 0x01000, 0x7ffff }, /* Upper 127/128 */ - { 1, 1, 1, { 0, 1, 0 }, 0x02000, 0x7ffff }, /* Upper 63/64 */ - { 1, 1, 1, { 0, 1, 1 }, 0x04000, 0x7ffff }, /* Upper 31/32 */ - { 1, 1, 1, { 1, 0, X }, 0x08000, 0x7ffff }, /* Upper 15/16 */ - { 1, 1, 1, { 1, 1, 0 }, 0x08000, 0x7ffff }, /* Upper 15/16 */ - { 1, 1, X, { 1, 1, 1 }, 0, 0x7ffff }, /* All */ - }; #elif defined(CONFIG_SPI_FLASH_W25Q64) static const struct protect_range spi_flash_protect_ranges[] = { { 0, X, X, { 0, 0, 0 }, 0, 0 }, /* No protection */ { 0, 0, 1, { 1, 1, 0 }, 0, 0x400000 }, /* Lower 1/2 */ - { 0, 1, 1, { 1, 0, X }, 0, 0x008000 }, /* Lower 1/256 */ - { 0, 0, 1, { 0, 0, 1 }, 0, 0x020000 }, /* Lower 1/64 */ - { 0, 0, 1, { 0, 1, 0 }, 0, 0x040000 }, /* Lower 1/32 */ - { 0, 0, 1, { 0, 1, 1 }, 0, 0x080000 }, /* Lower 1/16 */ - { 0, 0, 1, { 1, 0, 0 }, 0, 0x100000 }, /* Lower 1/8 */ { 0, 0, 1, { 1, 0, 1 }, 0, 0x200000 }, /* Lower 1/4 */ - { 0, X, X, { 1, 1, 1 }, 0, 0x800000 }, /* All protected */ }; #endif |