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 prepad;
16         int postpad;
17         struct nand_ecclayout * layout;
18         void (* hwctl) (struct mtd_info *mtd, int mode);
19         int (* calculate) (struct mtd_info *mtd,const uint8_t *dat,uint8_t *ecc_code);
20         int (* correct) (struct mtd_info *mtd, uint8_t *dat,uint8_t *read_ecc,uint8_t *calc_ecc);
21         int (* read_page_raw) (struct mtd_info *mtd,struct nand_chip *chip,uint8_t *buf, int page);
22         void (* write_page_raw) (struct mtd_info *mtd,struct nand_chip *chip,const uint8_t *buf);
23         int (* read_page) (struct mtd_info *mtd,struct nand_chip *chip,uint8_t *buf, int page);
24         int (* read_subpage) (struct mtd_info *mtd,struct nand_chip *chip,uint32_t offs, uint32_t len,uint8_t *buf);
25         void (* write_page) (struct mtd_info *mtd,struct nand_chip *chip,const uint8_t *buf);
26         int (* read_oob) (struct mtd_info *mtd,struct nand_chip *chip,int page,int sndcmd);
27         int (* write_oob) (struct mtd_info *mtd,struct nand_chip *chip,int page);
28       };
29

MEMBERS

31       mode
32           ecc mode
33
34       steps
35           number of ecc steps per page
36
37       size
38           data bytes per ecc step
39
40       bytes
41           ecc bytes per step
42
43       total
44           total number of ecc bytes per page
45
46       prepad
47           padding information for syndrome based ecc generators
48
49       postpad
50           padding information for syndrome based ecc generators
51
52       layout
53           ECC layout control struct pointer
54
55       hwctl
56           function to control hardware ecc generator. Must only be provided
57           if an hardware ECC is available
58
59       calculate
60           function for ecc calculation or readback from ecc hardware
61
62       correct
63           function for ecc correction, matching to ecc generator (sw/hw)
64
65       read_page_raw
66           function to read a raw page without ECC
67
68       write_page_raw
69           function to write a raw page without ECC
70
71       read_page
72           function to read a page according to the ecc generator requirements
73
74       read_subpage
75           function to read parts of the page covered by ECC.
76
77       write_page
78           function to write a page according to the ecc generator
79           requirements
80
81       read_oob
82           function to read chip OOB data
83
84       write_oob
85           function to write chip OOB data
86

AUTHOR

88       Thomas Gleixner <tglx@linutronix.de>
89           Author.
90
92Kernel Hackers Manual 2.6.       November 2011         STRUCT NAND_ECC_CTRL(9)
Impressum