1 struct stm32_flash_regs {
11 #define STM32_FLASH_KEY1 0x45670123
12 #define STM32_FLASH_KEY2 0xCDEF89AB
14 #define STM32_FLASH_SR_BSY (1 << 16)
16 #define STM32_FLASH_CR_PG (1 << 0)
17 #define STM32_FLASH_CR_SER (1 << 1)
18 #define STM32_FLASH_CR_STRT (1 << 16)
19 #define STM32_FLASH_CR_LOCK (1 << 31)
20 #define STM32_FLASH_CR_SNB_OFFSET 3
21 #define STM32_FLASH_CR_SNB_MASK (15 << STM32_FLASH_CR_SNB_OFFSET)
23 /* Flash ACR: Access control register */
24 #define FLASH_ACR_WS(n) n
25 #define FLASH_ACR_PRFTEN (1 << 8)
26 #define FLASH_ACR_ICEN (1 << 9)
27 #define FLASH_ACR_DCEN (1 << 10)