diff options
Diffstat (limited to 'chip/stm32/flash-stm32l.c')
-rw-r--r-- | chip/stm32/flash-stm32l.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/stm32/flash-stm32l.c b/chip/stm32/flash-stm32l.c index a26d32ea94..11c22dff0c 100644 --- a/chip/stm32/flash-stm32l.c +++ b/chip/stm32/flash-stm32l.c @@ -306,6 +306,13 @@ exit_er: int flash_physical_get_protect(int block) { + /* + * If the entire flash interface is locked, then all blocks are + * protected until reboot. + */ + if (flash_physical_get_protect_flags() & EC_FLASH_PROTECT_ALL_NOW) + return 1; + /* Check the active write protect status */ return STM32_FLASH_WRPR & (1 << block); } |