projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3562936
)
arm: stm32f4: fix a bug when only first sector gets erased
author
Vadzim Dambrouski
<pftbest@gmail.com>
Fri, 23 Oct 2015 18:14:06 +0000
(21:14 +0300)
committer
Albert ARIBAUD
<albert.u.boot@aribaud.net>
Tue, 10 Nov 2015 15:48:47 +0000
(16:48 +0100)
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>
arch/arm/cpu/armv7m/stm32f4/flash.c
patch
|
blob
|
history
diff --git
a/arch/arm/cpu/armv7m/stm32f4/flash.c
b/arch/arm/cpu/armv7m/stm32f4/flash.c
index e5c61113309e0d6b5d0df15082d8e9408f568d33..ae6379070f23f993a0062ea9be5f78430e41e0bf 100644
(file)
--- a/
arch/arm/cpu/armv7m/stm32f4/flash.c
+++ b/
arch/arm/cpu/armv7m/stm32f4/flash.c
@@
-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;
}