mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-12 11:00:28 +01:00
arm: stm32f4: fix a bug when only first sector gets erased
flash_lock call is inside a for loop, so after the first iteration flash is locked and no more sectors can be erased. Move flash_lock out of the loop. Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
This commit is contained in:
parent
3562936373
commit
4cd3246f2a
1 changed files with 1 additions and 1 deletions
|
|
@ -114,9 +114,9 @@ int flash_erase(flash_info_t *info, int first, int last)
|
|||
;
|
||||
|
||||
clrbits_le32(&STM32_FLASH->cr, STM32_FLASH_CR_SER);
|
||||
stm32f4_flash_lock(1);
|
||||
}
|
||||
|
||||
stm32f4_flash_lock(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue