]> git.sur5r.net Git - u-boot/commitdiff
env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE
authorDavid du Colombier <0intro@gmail.com>
Wed, 13 Jun 2012 21:24:35 +0000 (23:24 +0200)
committerLukasz Majewski <l.majewski@samsung.com>
Mon, 6 Aug 2012 08:38:47 +0000 (10:38 +0200)
This fix prevents env_import() CRC to fail when CONFIG_ENV_SIZE
is not equal to 4096 bytes
It also prevents mtd->read and mtd->write to be incomplete when
the environment is larger than 4096 bytes.

Signed-off-by: David du Colombier <0intro@gmail.com>
common/env_onenand.c

index 7197ab6585324c930b3410f880b7641860f702a7..da35071251f8941861392afdd0963e9a097b6243 100644 (file)
@@ -39,7 +39,7 @@
 
 char *env_name_spec = "OneNAND";
 
-#define ONENAND_MAX_ENV_SIZE   4096
+#define ONENAND_MAX_ENV_SIZE   CONFIG_ENV_SIZE
 #define ONENAND_ENV_SIZE(mtd)  (ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE)
 
 DECLARE_GLOBAL_DATA_PTR;