1
2
3
4
5
6
7
8
9
10 #ifndef __MTD_NAND_ECC_H__
11 #define __MTD_NAND_ECC_H__
12
13 struct nand_chip;
14
15
16
17
18 void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize,
19 u_char *ecc_code, bool sm_order);
20
21
22
23
24 int nand_calculate_ecc(struct nand_chip *chip, const u_char *dat,
25 u_char *ecc_code);
26
27
28
29
30 int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc,
31 unsigned int eccsize, bool sm_order);
32
33
34
35
36 int nand_correct_data(struct nand_chip *chip, u_char *dat, u_char *read_ecc,
37 u_char *calc_ecc);
38
39 #endif