diff options
Diffstat (limited to 'chip/stm32/flash-stm32f3.c')
-rw-r--r-- | chip/stm32/flash-stm32f3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/stm32/flash-stm32f3.c b/chip/stm32/flash-stm32f3.c index f0c8028f61..efa74c90cd 100644 --- a/chip/stm32/flash-stm32f3.c +++ b/chip/stm32/flash-stm32f3.c @@ -5,8 +5,10 @@ /* Flash memory module for stm32f3 and stm32f4 */ +#include <stdbool.h> #include "common.h" #include "flash.h" +#include "flash-f.h" #include "hooks.h" #include "registers.h" #include "system.h" @@ -103,6 +105,11 @@ uint32_t flash_physical_get_protect_flags(void) if (entire_flash_locked) flags |= EC_FLASH_PROTECT_ALL_NOW; +#if defined(CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE) + if (is_flash_rdp_enabled()) + flags |= EC_FLASH_PROTECT_RO_AT_BOOT; +#endif + return flags; } |