]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/env_onenand.c
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / common / env_onenand.c
index 0ad2fc7a4cd206785449c80584bb182c1dba0a7f..faa903d2f0251cd2459daef22d6d6514124dc86c 100644 (file)
 #include <errno.h>
 #include <onenand_uboot.h>
 
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
 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;
 
-uchar env_get_char_spec(int index)
-{
-       return *((uchar *)(gd->env_addr + index));
-}
-
 void env_relocate_spec(void)
 {
        struct mtd_info *mtd = &onenand_mtd;
@@ -100,7 +95,7 @@ int saveenv(void)
        };
 
        res = (char *)&env_new.data;
-       len = hexport_r(&env_htab, '\0', &res, ENV_SIZE, 0, NULL);
+       len = hexport_r(&env_htab, '\0', 0, &res, ENV_SIZE, 0, NULL);
        if (len < 0) {
                error("Cannot export environment: errno = %d\n", errno);
                return 1;