1STRUCT NAND_ECC_CTRL(9)           Structures           STRUCT NAND_ECC_CTRL(9)
2
3
4

NAME

6       struct_nand_ecc_ctrl - Control structure for ECC
7

SYNOPSIS

9       struct nand_ecc_ctrl {
10         nand_ecc_modes_t mode;
11         int steps;
12         int size;
13         int bytes;
14         int total;
15         int strength;
16         int prepad;
17         int postpad;
18         struct nand_ecclayout * layout;
19         void * priv;
20         void (* hwctl) (struct mtd_info *mtd, int mode);
21         int (* calculate) (struct mtd_info *mtd, const uint8_t *dat,uint8_t *ecc_code);
22         int (* correct) (struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc,uint8_t *calc_ecc);
23         int (* read_page_raw) (struct mtd_info *mtd, struct nand_chip *chip,uint8_t *buf, int oob_required, int page);
24         int (* write_page_raw) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf, int oob_required);
25         int (* read_page) (struct mtd_info *mtd, struct nand_chip *chip,uint8_t *buf, int oob_required, int page);
26         int (* read_subpage) (struct mtd_info *mtd, struct nand_chip *chip,uint32_t offs, uint32_t len, uint8_t *buf);
27         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);
28         int (* write_page) (struct mtd_info *mtd, struct nand_chip *chip,const uint8_t *buf, int oob_required);
29         int (* write_oob_raw) (struct mtd_info *mtd, struct nand_chip *chip,int page);
30         int (* read_oob_raw) (struct mtd_info *mtd, struct nand_chip *chip,int page);
31         int (* read_oob) (struct mtd_info *mtd, struct nand_chip *chip, int page);
32         int (* write_oob) (struct mtd_info *mtd, struct nand_chip *chip,int page);
33       };
34

MEMBERS

36       mode
37           ECC mode
38
39       steps
40           number of ECC steps per page
41
42       size
43           data bytes per ECC step
44
45       bytes
46           ECC bytes per step
47
48       total
49           total number of ECC bytes per page
50
51       strength
52           max number of correctible bits per ECC step
53
54       prepad
55           padding information for syndrome based ECC generators
56
57       postpad
58           padding information for syndrome based ECC generators
59
60       layout
61           ECC layout control struct pointer
62
63       priv
64           pointer to private ECC control data
65
66       hwctl
67           function to control hardware ECC generator. Must only be provided
68           if an hardware ECC is available
69
70       calculate
71           function for ECC calculation or readback from ECC hardware
72
73       correct
74           function for ECC correction, matching to ECC generator (sw/hw)
75
76       read_page_raw
77           function to read a raw page without ECC
78
79       write_page_raw
80           function to write a raw page without ECC
81
82       read_page
83           function to read a page according to the ECC generator
84           requirements; returns maximum number of bitflips corrected in any
85           single ECC step, 0 if bitflips uncorrectable, -EIO hw error
86
87       read_subpage
88           function to read parts of the page covered by ECC; returns same as
89           read_page
90
91       write_subpage
92           function to write parts of the page covered by ECC.
93
94       write_page
95           function to write a page according to the ECC generator
96           requirements.
97
98       write_oob_raw
99           function to write chip OOB data without ECC
100
101       read_oob_raw
102           function to read chip OOB data without ECC
103
104       read_oob
105           function to read chip OOB data
106
107       write_oob
108           function to write chip OOB data
109

AUTHOR

111       Thomas Gleixner <tglx@linutronix.de>
112           Author.
113
115Kernel Hackers Manual 3.10         June 2019           STRUCT NAND_ECC_CTRL(9)
Impressum