|
22 | 22 | #include <linux/mtd/ndfc.h>
|
23 | 23 | #include <linux/slab.h>
|
24 | 24 | #include <linux/mtd/mtd.h>
|
25 |
| -#include <linux/mtd/nand-ecc-sw-hamming.h> |
26 | 25 | #include <linux/of_address.h>
|
27 | 26 | #include <linux/of_platform.h>
|
28 | 27 | #include <asm/io.h>
|
@@ -101,15 +100,6 @@ static int ndfc_calculate_ecc(struct nand_chip *chip,
|
101 | 100 | return 0;
|
102 | 101 | }
|
103 | 102 |
|
104 |
| -static int ndfc_correct_ecc(struct nand_chip *chip, |
105 |
| - unsigned char *buf, |
106 |
| - unsigned char *read_ecc, |
107 |
| - unsigned char *calc_ecc) |
108 |
| -{ |
109 |
| - return ecc_sw_hamming_correct(buf, read_ecc, calc_ecc, |
110 |
| - chip->ecc.size, false); |
111 |
| -} |
112 |
| - |
113 | 103 | /*
|
114 | 104 | * Speedups for buffer read/write/verify
|
115 | 105 | *
|
@@ -155,7 +145,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
|
155 | 145 | chip->controller = &ndfc->ndfc_control;
|
156 | 146 | chip->legacy.read_buf = ndfc_read_buf;
|
157 | 147 | chip->legacy.write_buf = ndfc_write_buf;
|
158 |
| - chip->ecc.correct = ndfc_correct_ecc; |
| 148 | + chip->ecc.correct = rawnand_sw_hamming_correct; |
159 | 149 | chip->ecc.hwctl = ndfc_enable_hwecc;
|
160 | 150 | chip->ecc.calculate = ndfc_calculate_ecc;
|
161 | 151 | chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
|
|
0 commit comments