From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 22 Oct 2015 08:13:28 +0200 Subject: [U-Boot] [PATCH 1/2] arm: stm32f4: fix a bug when only first sector gets erased In-Reply-To: <1445298105-25571-1-git-send-email-pftbest@gmail.com> References: <1445298105-25571-1-git-send-email-pftbest@gmail.com> Message-ID: <20151022081328.35d28b91@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Vadzim, On Tue, 20 Oct 2015 02:41:44 +0300, Vadzim Dambrouski wrote: > flash_lock call is inside a for cycle, so after the first iteration flash > is locked and no more sectors can be erased. Nitpick: the commit summary explains the problem well, but not the (admittedly) trivial solution; just add it: flash_lock call is inside a for cycle, 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 Amicalement, -- Albert.