Lines Matching refs:regs

37 static inline void flush_cache(FLASH_TypeDef *regs)  in flush_cache()  argument
39 if (regs->ACR & FLASH_ACR_DCEN) { in flush_cache()
40 regs->ACR &= ~FLASH_ACR_DCEN; in flush_cache()
44 regs->ACR |= FLASH_ACR_DCRST; in flush_cache()
45 regs->ACR &= ~FLASH_ACR_DCRST; in flush_cache()
46 regs->ACR |= FLASH_ACR_DCEN; in flush_cache()
49 if (regs->ACR & FLASH_ACR_ICEN) { in flush_cache()
50 regs->ACR &= ~FLASH_ACR_ICEN; in flush_cache()
55 regs->ACR |= FLASH_ACR_ICRST; in flush_cache()
56 regs->ACR &= ~FLASH_ACR_ICRST; in flush_cache()
57 regs->ACR |= FLASH_ACR_ICEN; in flush_cache()
64 FLASH_TypeDef *regs = FLASH_STM32_REGS(dev); in write_dword() local
72 if (regs->CR & FLASH_CR_LOCK) { in write_dword()
160 regs->CR |= FLASH_CR_PG; in write_dword()
163 tmp = regs->CR; in write_dword()
197 regs->CR &= (~FLASH_CR_PG); in write_dword()
208 FLASH_TypeDef *regs = FLASH_STM32_REGS(dev); in erase_page() local
212 if (regs->CR & FLASH_CR_LOCK) { in erase_page()
227 flush_cache(regs); in erase_page()
296 regs->CR |= FLASH_CR_PER; in erase_page()
297 regs->CR &= ~FLASH_CR_PNB_Msk; in erase_page()
298 regs->CR |= page << FLASH_CR_PNB_Pos; in erase_page()
300 regs->CR |= FLASH_CR_STRT; in erase_page()
328 regs->CR &= ~FLASH_CR_PER; in erase_page()
410 FLASH_TypeDef *regs = FLASH_STM32_REGS(dev); in flash_stm32_check_status() local
414 error = (regs->SR & FLASH_FLAG_SR_ERRORS); in flash_stm32_check_status()
415 error |= (regs->ECCR & FLASH_FLAG_ECCC); in flash_stm32_check_status()
419 regs->SR |= FLASH_FLAG_SR_ERRORS; in flash_stm32_check_status()