km_arm: use filesize for erase in update command
authorValentin Longchamp <valentin.longchamp@keymile.com>
Fri, 25 May 2012 01:57:21 +0000 (01:57 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 7 Jul 2012 12:07:31 +0000 (14:07 +0200)
We used to have an arbitrary value, which can be a problem if we have a
u-boot image that is bigger than this value.

This patch is dependant on the whole km/arm series and will be included
in the v3 of the series if there is one.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>

include/configs/km/km_arm.h

index 43a0efb426160ca3d6ebcea5b6fb888dd462730f..4a0b80e292dc774ef1452e47238112ae28c75518 100644 (file)
@@ -241,7 +241,7 @@ int get_scl(void);
 
 #define        CONFIG_KM_UPDATE_UBOOT                                          \
        "update="                                                       \
-               "spi on;sf probe 0;sf erase 0 50000;"                   \
+               "spi on;sf probe 0;sf erase 0 +${filesize};"            \
                "sf write ${load_addr_r} 0 ${filesize};"                \
                "spi off\0"