X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fenv_nand.c;h=3a98d2b944b17b8853766cbb6bfcd6f4b136f58d;hb=e34a0e911b6a1568d0ca864234fbd0ee060d9b35;hp=38a07f8993f7ab1226044ed2497f05788ee9bfc5;hpb=93f798346033a1f6d22090b47abad4be88243b04;p=u-boot diff --git a/common/env_nand.c b/common/env_nand.c index 38a07f8993..3a98d2b944 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -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)