Lines Matching refs:STM32_FLASH
14 #define STM32_FLASH ((struct stm32_flash_regs *)STM32_FLASH_CNTL_BASE) macro
20 | FLASH_ACR_DCEN, &STM32_FLASH->acr); in stm32_flash_latency_cfg()
26 setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_LOCK); in stm32_flash_lock()
28 writel(STM32_FLASH_KEY1, &STM32_FLASH->key); in stm32_flash_lock()
29 writel(STM32_FLASH_KEY2, &STM32_FLASH->key); in stm32_flash_lock()
97 while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY) in flash_erase()
101 clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SNB_MASK); in flash_erase()
104 setbits_le32(&STM32_FLASH->cr, in flash_erase()
107 setbits_le32(&STM32_FLASH->cr, in flash_erase()
113 setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SER); in flash_erase()
114 setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_STRT); in flash_erase()
116 while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY) in flash_erase()
119 clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SER); in flash_erase()
130 while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY) in write_buff()
135 setbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_PG); in write_buff()
143 while (readl(&STM32_FLASH->sr) & STM32_FLASH_SR_BSY) in write_buff()
146 clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_PG); in write_buff()