diff options
Diffstat (limited to 'common/spi_flash_reg.c')
-rw-r--r-- | common/spi_flash_reg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/spi_flash_reg.c b/common/spi_flash_reg.c index 2e9fbbd469..1301e19dc5 100644 --- a/common/spi_flash_reg.c +++ b/common/spi_flash_reg.c @@ -72,7 +72,14 @@ static const struct protect_range spi_flash_protect_ranges[] = { { 0, 0, 1, { 0, 1, 1 }, 0, 0x40000 }, /* Lower 1/4 */ { 0, 0, 1, { 1, 0, 0 }, 0, 0x80000 }, /* Lower 1/2 */ }; - +#elif defined(CONFIG_SPI_FLASH_W25Q128) +static const struct protect_range spi_flash_protect_ranges[] = { + /* CMP = 0 */ + { 0, X, X, { 0, 0, 0 }, 0, 0 }, /* No protection */ + { 0, 0, 1, { 1, 0, 0 }, 0, 0x20000 }, /* Lower 1/8 */ + { 0, 0, 1, { 1, 0, 1 }, 0, 0x40000 }, /* Lower 1/4 */ + { 0, 0, 1, { 1, 1, 0 }, 0, 0x80000 }, /* Lower 1/2 */ +}; #endif /** |