From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadzim Dambrouski Date: Tue, 20 Oct 2015 02:41:44 +0300 Subject: [U-Boot] [PATCH 1/2] arm: stm32f4: fix a bug when only first sector gets erased Message-ID: <1445298105-25571-1-git-send-email-pftbest@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de flash_lock call is inside a for cycle, so after the first iteration flash is locked and no more sectors can be erased. Signed-off-by: Vadzim Dambrouski --- arch/arm/cpu/armv7m/stm32f4/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7m/stm32f4/flash.c b/arch/arm/cpu/armv7m/stm32f4/flash.c index e5c6111..ae63790 100644 --- 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; } -- 2.6.1