STRUCT RS_CONTROL(9) Structures STRUCT RS_CONTROL(9)NAME
struct_rs_control - rs control structure
SYNOPSIS
struct rs_control {
int mm;
int nn;
uint16_t * alpha_to;
uint16_t * index_of;
uint16_t * genpoly;
int nroots;
int fcr;
int prim;
int iprim;
int gfpoly;
int (* gffunc) (int);
int users;
struct list_head list;
};
MEMBERS
mm
Bits per symbol
nn
Symbols per block (= (1<<mm)-1)
alpha_to
log lookup table
index_of
Antilog lookup table
genpoly
Generator polynomial
nroots
Number of generator roots = number of parity symbols
fcr
First consecutive root, index form
prim
Primitive element, index form
iprim
prim-th root of 1, index form
gfpoly
The primitive generator polynominal
gffunc
Function to generate the field, if non-canonical representation
users
Users of this structure
list
List entry for the rs control list
AUTHOR
Thomas Gleixner <tglx@linutronix.de>
Author.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 STRUCT RS_CONTROL(9)
Check Out this Related Man Page
STRUCT NAND_ECC_CTRL(9) Structures STRUCT NAND_ECC_CTRL(9)NAME
struct_nand_ecc_ctrl - Control structure for ECC
SYNOPSIS
struct nand_ecc_ctrl {
nand_ecc_modes_t mode;
int steps;
int size;
int bytes;
int total;
int strength;
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 oob_required, int page);
int (* write_page_raw) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf, int oob_required);
int (* read_page) (struct mtd_info *mtd, struct nand_chip *chip,uint8_t *buf, int oob_required, int page);
int (* read_subpage) (struct mtd_info *mtd, struct nand_chip *chip,uint32_t offs, uint32_t len, uint8_t *buf);
int (* write_subpage) (struct mtd_info *mtd, struct nand_chip *chip,uint32_t offset, uint32_t data_len,const uint8_t *data_buf, int oob_required);
int (* write_page) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf, int oob_required);
int (* write_oob_raw) (struct mtd_info *mtd, struct nand_chip *chip,int page);
int (* read_oob_raw) (struct mtd_info *mtd, struct nand_chip *chip,int page);
int (* read_oob) (struct mtd_info *mtd, struct nand_chip *chip, int page);
int (* write_oob) (struct mtd_info *mtd, struct nand_chip *chip,int page);
};
MEMBERS
mode
ECC mode
steps
number of ECC steps per page
size
data bytes per ECC step
bytes
ECC bytes per step
total
total number of ECC bytes per page
strength
max number of correctible bits per ECC step
prepad
padding information for syndrome based ECC generators
postpad
padding information for syndrome based ECC generators
layout
ECC layout control struct pointer
priv
pointer to private ECC control data
hwctl
function to control hardware ECC generator. Must only be provided if an hardware ECC is available
calculate
function for ECC calculation or readback from ECC hardware
correct
function for ECC correction, matching to ECC generator (sw/hw)
read_page_raw
function to read a raw page without ECC
write_page_raw
function to write a raw page without ECC
read_page
function to read a page according to the ECC generator requirements; returns maximum number of bitflips corrected in any single ECC
step, 0 if bitflips uncorrectable, -EIO hw error
read_subpage
function to read parts of the page covered by ECC; returns same as read_page
write_subpage
function to write parts of the page covered by ECC.
write_page
function to write a page according to the ECC generator requirements.
write_oob_raw
function to write chip OOB data without ECC
read_oob_raw
function to read chip OOB data without ECC
read_oob
function to read chip OOB data
write_oob
function to write chip OOB data
AUTHOR
Thomas Gleixner <tglx@linutronix.de>
Author.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 STRUCT NAND_ECC_CTRL(9)