summaryrefslogtreecommitdiff
path: root/chip/stm32/flash-stm32l.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/flash-stm32l.c')
-rw-r--r--chip/stm32/flash-stm32l.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/chip/stm32/flash-stm32l.c b/chip/stm32/flash-stm32l.c
index 106e436c80..5a84d31f46 100644
--- a/chip/stm32/flash-stm32l.c
+++ b/chip/stm32/flash-stm32l.c
@@ -319,8 +319,7 @@ int flash_physical_get_protect(int block)
int flash_physical_protect_at_boot(enum flash_wp_range range)
{
uint32_t prot;
- uint32_t mask = ((1 << (RO_BANK_COUNT + PSTATE_BANK_COUNT)) - 1)
- << RO_BANK_OFFSET;
+ uint32_t mask = ((1 << WP_BANK_COUNT) - 1) << WP_BANK_OFFSET;
int rv;
if (range == FLASH_WP_ALL)