struct nand_ecc_ctrl — Control structure for ecc
struct nand_ecc_ctrl { nand_ecc_modes_t mode; int steps; int size; int bytes; int total; int prepad; int postpad; struct nand_ecclayout * layout; void * priv; void (* hwctl) (struct mtd_info *mtd, int mode); int (* calculate) (struct mtd_info *mtd, const uint8_t *dat,uint8_t *ecc_code); int (* correct) (struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc,uint8_t *calc_ecc); int (* read_page_raw) (struct mtd_info *mtd, struct nand_chip *chip,uint8_t *buf, int page); void (* write_page_raw) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf); int (* read_page) (struct mtd_info *mtd, struct nand_chip *chip,uint8_t *buf, int page); int (* read_subpage) (struct mtd_info *mtd, struct nand_chip *chip,uint32_t offs, uint32_t len, uint8_t *buf); void (* write_page) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf); int (* read_oob) (struct mtd_info *mtd, struct nand_chip *chip, int page,int sndcmd); int (* write_oob) (struct mtd_info *mtd, struct nand_chip *chip,int page); };
ecc mode
number of ecc steps per page
data bytes per ecc step
ecc bytes per step
total number of ecc bytes per page
padding information for syndrome based ecc generators
padding information for syndrome based ecc generators
ECC layout control struct pointer
pointer to private ecc control data
function to control hardware ecc generator. Must only be provided if an hardware ECC is available
function for ecc calculation or readback from ecc hardware
function for ecc correction, matching to ecc generator (sw/hw)
function to read a raw page without ECC
function to write a raw page without ECC
function to read a page according to the ecc generator requirements.
function to read parts of the page covered by ECC.
function to write a page according to the ecc generator requirements.
function to read chip OOB data
function to write chip OOB data