Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

* 'master' of git://git.denx.de/u-boot-nand-flash:
  nand_spl/nand_boot.c: Fix build warning
  drivers/mtd/nand/nand_spl_load.c: Fix GCC 4.6 warning
  drivers/mtd/nand/nand_spl_simple.c: Fix GCC 4.6 warnings
This commit is contained in:
Wolfgang Denk 2011-12-08 20:54:13 +01:00
commit 4b6f394fc4
3 changed files with 9 additions and 13 deletions

View File

@ -28,23 +28,22 @@
*/ */
void nand_boot(void) void nand_boot(void)
{ {
int ret;
__attribute__((noreturn)) void (*uboot)(void); __attribute__((noreturn)) void (*uboot)(void);
/* /*
* Load U-Boot image from NAND into RAM * Load U-Boot image from NAND into RAM
*/ */
ret = nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
CONFIG_SYS_NAND_U_BOOT_SIZE, CONFIG_SYS_NAND_U_BOOT_SIZE,
(void *)CONFIG_SYS_NAND_U_BOOT_DST); (void *)CONFIG_SYS_NAND_U_BOOT_DST);
#ifdef CONFIG_NAND_ENV_DST #ifdef CONFIG_NAND_ENV_DST
ret = nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
(void *)CONFIG_NAND_ENV_DST); (void *)CONFIG_NAND_ENV_DST);
#ifdef CONFIG_ENV_OFFSET_REDUND #ifdef CONFIG_ENV_OFFSET_REDUND
ret = nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE, nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
(void *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE); (void *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
#endif #endif
#endif #endif

View File

@ -153,7 +153,6 @@ static int nand_read_page(int block, int page, uchar *dst)
int eccbytes = CONFIG_SYS_NAND_ECCBYTES; int eccbytes = CONFIG_SYS_NAND_ECCBYTES;
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; int eccsteps = CONFIG_SYS_NAND_ECCSTEPS;
uint8_t *p = dst; uint8_t *p = dst;
int stat;
/* /*
* No malloc available for now, just use some temporary locations * No malloc available for now, just use some temporary locations
@ -176,7 +175,7 @@ static int nand_read_page(int block, int page, uchar *dst)
this->ecc.hwctl(&mtd, NAND_ECC_READ); this->ecc.hwctl(&mtd, NAND_ECC_READ);
this->read_buf(&mtd, p, eccsize); this->read_buf(&mtd, p, eccsize);
this->ecc.calculate(&mtd, p, &ecc_calc[i]); this->ecc.calculate(&mtd, p, &ecc_calc[i]);
stat = this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]);
} }
return 0; return 0;
@ -193,7 +192,6 @@ static int nand_read_page(int block, int page, void *dst)
int eccbytes = CONFIG_SYS_NAND_ECCBYTES; int eccbytes = CONFIG_SYS_NAND_ECCBYTES;
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; int eccsteps = CONFIG_SYS_NAND_ECCSTEPS;
uint8_t *p = dst; uint8_t *p = dst;
int stat;
nand_command(block, page, 0, NAND_CMD_READ0); nand_command(block, page, 0, NAND_CMD_READ0);
@ -224,7 +222,7 @@ static int nand_read_page(int block, int page, void *dst)
* from correct_data(). We just hope that all possible errors * from correct_data(). We just hope that all possible errors
* are corrected by this routine. * are corrected by this routine.
*/ */
stat = this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]);
} }
return 0; return 0;

View File

@ -147,7 +147,6 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
int eccbytes = CONFIG_SYS_NAND_ECCBYTES; int eccbytes = CONFIG_SYS_NAND_ECCBYTES;
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; int eccsteps = CONFIG_SYS_NAND_ECCSTEPS;
uint8_t *p = dst; uint8_t *p = dst;
int stat;
/* /*
* No malloc available for now, just use some temporary locations * No malloc available for now, just use some temporary locations
@ -170,7 +169,7 @@ static int nand_read_page(struct mtd_info *mtd, int block, int page, uchar *dst)
this->ecc.hwctl(mtd, NAND_ECC_READ); this->ecc.hwctl(mtd, NAND_ECC_READ);
this->read_buf(mtd, p, eccsize); this->read_buf(mtd, p, eccsize);
this->ecc.calculate(mtd, p, &ecc_calc[i]); this->ecc.calculate(mtd, p, &ecc_calc[i]);
stat = this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
} }
return 0; return 0;