Name

__nand_correct_data — [NAND Interface] Detect and correct bit error(s)

Synopsis

int __nand_correct_data (unsigned char * buf,
 unsigned char * read_ecc,
 unsigned char * calc_ecc,
 unsigned int eccsize);
 

Arguments

unsigned char * buf

raw data read from the chip

unsigned char * read_ecc

ECC from the chip

unsigned char * calc_ecc

the ECC calculated from raw data

unsigned int eccsize

data bytes per ECC step (256 or 512)

Description

Detect and correct a 1 bit error for eccsize byte block