[U-Boot] [PATCH v2 2/2] arm: stm32f4: fix a bug when a random sector gets erased

2015-10-23 Thread Vadzim Dambrouski
Old sector number is not being cleared from FLASH_CR register. For example when first erased sector was 001 and then you want to erase sector 010, sector 011 gets erased instead. This patch clears old sector number from FLASH_CR register before a new one is written. Signed-off-by: Vadzim

[U-Boot] [PATCH v2 1/2] arm: stm32f4: fix a bug when only first sector gets erased

2015-10-23 Thread Vadzim Dambrouski
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 <pftb...@gmail.com> --- arch/arm/cpu/armv7m/stm32f4/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [U-Boot] [PATCH v2 2/2] arm: fix compile warnings when semihosting is enabled on ARMv7M target.

2015-10-19 Thread Vadzim Dambrouski
On 19.10.2015 09:06, Albert ARIBAUD wrote: Hello Vadzim, On Mon, 19 Oct 2015 00:13:29 +0300, Vadzim Dambrouski <pftb...@gmail.com> wrote: Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/arm/lib/semihosting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [U-Boot] [PATCH] arm: add support for semihosting for ARMv7M targets

2015-10-19 Thread Vadzim Dambrouski
On 19.10.2015 18:37, Tom Rini wrote: On Mon, Oct 19, 2015 at 09:12:25AM +0200, Linus Walleij wrote: On Sun, Oct 18, 2015 at 11:45 AM, Vadzim Dambrouski <pftb...@gmail.com> wrote: On 18.10.2015 12:20, Linus Walleij wrote: Hey, cool. Technically the (ulong) typecasts should be another

[U-Boot] [PATCH 2/2] arm: stm32f4: fix a bug when a random sector gets erased

2015-10-19 Thread Vadzim Dambrouski
Old sector number is not being cleared from FLASH_CR register. For example when first erased sector was 001 and then you want to erase sector 010, sector 011 gets erased instead. This patch clears old sector number from FLASH_CR register before a new one is written. Signed-off-by: Vadzim

[U-Boot] [PATCH 1/2] arm: stm32f4: fix a bug when only first sector gets erased

2015-10-19 Thread Vadzim Dambrouski
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 <pftb...@gmail.com> --- arch/arm/cpu/armv7m/stm32f4/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/a

[U-Boot] [PATCH v3 2/2] arm: fix compile warnings when semihosting is enabled on ARMv7M target.

2015-10-19 Thread Vadzim Dambrouski
This patch fixes compile warnings like this: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' In C99 standard you can use %zu modifier to print size_t values. Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/a

[U-Boot] [PATCH v3 1/2] arm: add support for semihosting for ARMv7M targets

2015-10-19 Thread Vadzim Dambrouski
r.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/arm/lib/semihosting.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index c3e964e..ed5e8e4 100644 --- a/arch/arm/

[U-Boot] [PATCH v2 2/2] arm: fix compile warnings when semihosting is enabled on ARMv7M target.

2015-10-18 Thread Vadzim Dambrouski
Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/arm/lib/semihosting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index ed5e8e4..6541cb4 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/a

[U-Boot] [PATCH v2 1/2] arm: add support for semihosting for ARMv7M targets

2015-10-18 Thread Vadzim Dambrouski
It is possible to enable CONFIG_SEMIHOSTING for STM32F429 target, but it would result in compile error. This patch adds support for semihosting for STM32F429 or any other ARMv7M target. Tested on STM32F429-DISCOVERY board. Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/a

Re: [U-Boot] [PATCH] arm: add support for semihosting for ARMv7M targets

2015-10-18 Thread Vadzim Dambrouski
On 18.10.2015 12:20, Linus Walleij wrote: > Hey, cool. Technically the (ulong) typecasts should be another patch Sorry about that, this is my first time sending a patch. > Are you using this with the smload commands? Yes, I do use smhload command, and openocd on the other end. Useful for

[U-Boot] [PATCH] arm: add support for semihosting for ARMv7M targets

2015-10-17 Thread Vadzim Dambrouski
It is possible to enable CONFIG_SEMIHOSTING for STM32F429 target, but it would result in compile error. This patch adds support for semihosting for STM32F429 or any other ARMv7M target. Tested on STM32F429-DISCOVERY board. Signed-off-by: Vadzim Dambrouski <pftb...@gmail.com> --- arch/a