|
|
|
@ -153,7 +153,6 @@ static int nand_read_page(int block, int page, uchar *dst) |
|
|
|
|
int eccbytes = CONFIG_SYS_NAND_ECCBYTES; |
|
|
|
|
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; |
|
|
|
|
uint8_t *p = dst; |
|
|
|
|
int stat; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* 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->read_buf(&mtd, p, eccsize); |
|
|
|
|
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; |
|
|
|
@ -193,7 +192,6 @@ static int nand_read_page(int block, int page, void *dst) |
|
|
|
|
int eccbytes = CONFIG_SYS_NAND_ECCBYTES; |
|
|
|
|
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; |
|
|
|
|
uint8_t *p = dst; |
|
|
|
|
int stat; |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
* 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; |
|
|
|
|