aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2009-10-22 03:53:32 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-11-30 04:32:19 -0500
commit1c63aca32903efc219fb9df72bae5344f3e54ed5 (patch)
treef3731478a5b163344e55bdf03eef25895d03cdab /include/linux/mtd
parent3cf602532c535ec655725e9833378e04c9fd7783 (diff)
mtd: Add __nand_calculate_ecc() to NAND ECC functions
Add __nand_calculate_ecc() which does not take struct mtd_info. The built-in 256/512 software ECC calculation and correction tester will use it. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Vimal Singh <vimalsingh@ti.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand_ecc.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/mtd/nand_ecc.h b/include/linux/mtd/nand_ecc.h
index 052ea8ca2434..41bc013571d0 100644
--- a/include/linux/mtd/nand_ecc.h
+++ b/include/linux/mtd/nand_ecc.h
@@ -16,7 +16,13 @@
16struct mtd_info; 16struct mtd_info;
17 17
18/* 18/*
19 * Calculate 3 byte ECC code for 256 byte block 19 * Calculate 3 byte ECC code for eccsize byte block
20 */
21void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize,
22 u_char *ecc_code);
23
24/*
25 * Calculate 3 byte ECC code for 256/512 byte block
20 */ 26 */
21int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code); 27int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
22 28
@@ -27,7 +33,7 @@ int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc,
27 unsigned int eccsize); 33 unsigned int eccsize);
28 34
29/* 35/*
30 * Detect and correct a 1 bit error for 256 byte block 36 * Detect and correct a 1 bit error for 256/512 byte block
31 */ 37 */
32int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); 38int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc);
33 39