From 2c760cf30b95715791eb43701b3d5536558b3a8d Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 12 Sep 2018 14:25:31 -0700 Subject: flash: Add CONFIG_FLASH_READOUT_PROTECTION config option Instead of tying together CONFIG_WP_ALWAYS and RDP protection, separate the options. BRANCH=nocturne BUG=b:111330723 TEST=make buildall -j Change-Id: I905b573a900ef4dd0431666c525c951582143e09 Signed-off-by: Nicolas Boichat Reviewed-on: https://chromium-review.googlesource.com/1222093 Reviewed-by: Randall Spangler --- chip/stm32/flash-f.c | 2 +- chip/stm32/flash-stm32l4.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chip') diff --git a/chip/stm32/flash-f.c b/chip/stm32/flash-f.c index 51fcf806ae..aaf8e69873 100644 --- a/chip/stm32/flash-f.c +++ b/chip/stm32/flash-f.c @@ -505,7 +505,7 @@ int flash_physical_protect_at_boot(uint32_t new_flags) if (original_val[i] != val[i]) write_optb(i * 2 + 8, val[i]); -#ifdef CONFIG_WP_ALWAYS +#ifdef CONFIG_FLASH_READOUT_PROTECTION /* * Set a permanent protection by increasing RDP to level 1, * trying to unprotected the flash will trigger a full erase. diff --git a/chip/stm32/flash-stm32l4.c b/chip/stm32/flash-stm32l4.c index 821d277b7a..97594733c0 100644 --- a/chip/stm32/flash-stm32l4.c +++ b/chip/stm32/flash-stm32l4.c @@ -167,7 +167,7 @@ int flash_physical_protect_at_boot(uint32_t new_flags) } unlock_optb(); -#ifdef CONFIG_WP_ALWAYS +#ifdef CONFIG_FLASH_READOUT_PROTECTION /* * Set a permanent protection by increasing RDP to level 1, * trying to unprotected the flash will trigger a full erase. -- cgit v1.2.1