]> git.sur5r.net Git - u-boot/blobdiff - common/env_nand.c
PPC: 86xx Add bat registers to reginfo command
[u-boot] / common / env_nand.c
index 38a07f8993f7ab1226044ed2497f05788ee9bfc5..3a98d2b944b17b8853766cbb6bfcd6f4b136f58d 100644 (file)
@@ -57,9 +57,6 @@ int nand_legacy_rw (struct nand_chip* nand, int cmd,
            size_t start, size_t len,
            size_t * retlen, u_char * buf);
 
-/* info for NAND chips, defined in drivers/nand/nand.c */
-extern nand_info_t nand_info[];
-
 /* references to names in env_common.c */
 extern uchar default_environment[];
 extern int default_environment_size;
@@ -102,7 +99,7 @@ uchar env_get_char_spec (int index)
 int env_init(void)
 {
 #if defined(ENV_IS_EMBEDDED)
-       ulong total;
+       size_t total;
        int crc1_ok = 0, crc2_ok = 0;
        env_t *tmp_env1, *tmp_env2;
 
@@ -154,7 +151,7 @@ int env_init(void)
 #ifdef CFG_ENV_OFFSET_REDUND
 int saveenv(void)
 {
-       ulong total;
+       size_t total;
        int ret = 0;
 
        env_ptr->flags++;
@@ -188,7 +185,7 @@ int saveenv(void)
 #else /* ! CFG_ENV_OFFSET_REDUND */
 int saveenv(void)
 {
-       ulong total;
+       size_t total;
        int ret = 0;
 
        puts ("Erasing Nand...");
@@ -211,7 +208,7 @@ int saveenv(void)
 void env_relocate_spec (void)
 {
 #if !defined(ENV_IS_EMBEDDED)
-       ulong total;
+       size_t total;
        int crc1_ok = 0, crc2_ok = 0;
        env_t *tmp_env1, *tmp_env2;
 
@@ -268,12 +265,12 @@ void env_relocate_spec (void)
 void env_relocate_spec (void)
 {
 #if !defined(ENV_IS_EMBEDDED)
-       ulong total;
+       size_t total;
        int ret;
 
        total = CFG_ENV_SIZE;
        ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr);
-       if (ret || total != CFG_ENV_SIZE)
+       if (ret || total != CFG_ENV_SIZE)
                return use_default();
 
        if (crc32(0, env_ptr->data, ENV_SIZE) != env_ptr->crc)