hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/mtd/nand_ecc.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2000-2010 Steven J. Hill <sjhill@realitydiluted.com>
34 * David Woodhouse <dwmw2@infradead.org>
45 * Thomas Gleixner <tglx@linutronix.de>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * This file is the header for the ECC algorithm.
118 */
....@@ -13,28 +10,30 @@
1310 #ifndef __MTD_NAND_ECC_H__
1411 #define __MTD_NAND_ECC_H__
1512
16
-struct mtd_info;
13
+struct nand_chip;
1714
1815 /*
1916 * Calculate 3 byte ECC code for eccsize byte block
2017 */
2118 void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize,
22
- u_char *ecc_code);
19
+ u_char *ecc_code, bool sm_order);
2320
2421 /*
2522 * Calculate 3 byte ECC code for 256/512 byte block
2623 */
27
-int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
24
+int nand_calculate_ecc(struct nand_chip *chip, const u_char *dat,
25
+ u_char *ecc_code);
2826
2927 /*
3028 * Detect and correct a 1 bit error for eccsize byte block
3129 */
3230 int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc,
33
- unsigned int eccsize);
31
+ unsigned int eccsize, bool sm_order);
3432
3533 /*
3634 * Detect and correct a 1 bit error for 256/512 byte block
3735 */
38
-int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc);
36
+int nand_correct_data(struct nand_chip *chip, u_char *dat, u_char *read_ecc,
37
+ u_char *calc_ecc);
3938
4039 #endif /* __MTD_NAND_ECC_H__ */