summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2012-06-13 23:24:35 +0200
committerLukasz Majewski <l.majewski@samsung.com>2012-08-06 10:38:47 +0200
commit034afbcc167651f1322c50a58cac278e2256f4b8 (patch)
treeda5e782cfa2ffc67d579591d24bd3cc19b10fb40 /common
parent56249fea3d5e32cddcd9160e51ec93a9c4327c6b (diff)
downloadu-boot-imx-034afbcc167651f1322c50a58cac278e2256f4b8.zip
u-boot-imx-034afbcc167651f1322c50a58cac278e2256f4b8.tar.gz
u-boot-imx-034afbcc167651f1322c50a58cac278e2256f4b8.tar.bz2
env_onenand: set ONENAND_MAX_ENV_SIZE to CONFIG_ENV_SIZE
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>
Diffstat (limited to 'common')
-rw-r--r--common/env_onenand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 7197ab6..da35071 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -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;