Searched refs:ecc_code (Results 1 - 19 of 19) sorted by relevance

/linux-4.1.27/include/linux/mtd/
H A Dnand_ecc.h24 u_char *ecc_code);
29 int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
H A Dnand_bch.h25 u_char *ecc_code); mtd_nand_has_bch()
49 u_char *ecc_code) nand_bch_calculate_ecc()
48 nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) nand_bch_calculate_ecc() argument
H A Dnand.h499 uint8_t *ecc_code);
/linux-4.1.27/drivers/mtd/nand/
H A Domap2.c920 * @ecc_code: The ecc_code buffer
929 u_char *ecc_code) omap_calculate_ecc()
941 *ecc_code++ = val; /* P128e, ..., P1e */ omap_calculate_ecc()
942 *ecc_code++ = val >> 16; /* P128o, ..., P1o */ omap_calculate_ecc()
944 *ecc_code++ = ((val >> 8) & 0x0f) | ((val >> 20) & 0xf0); omap_calculate_ecc()
1158 * @ecc_code: The ecc_code buffer
1169 u8 *ecc_code; omap_calculate_ecc_bch() local
1176 ecc_code = ecc_calc; omap_calculate_ecc_bch()
1184 *ecc_code++ = (bch_val4 & 0xFF); omap_calculate_ecc_bch()
1185 *ecc_code++ = ((bch_val3 >> 24) & 0xFF); omap_calculate_ecc_bch()
1186 *ecc_code++ = ((bch_val3 >> 16) & 0xFF); omap_calculate_ecc_bch()
1187 *ecc_code++ = ((bch_val3 >> 8) & 0xFF); omap_calculate_ecc_bch()
1188 *ecc_code++ = (bch_val3 & 0xFF); omap_calculate_ecc_bch()
1189 *ecc_code++ = ((bch_val2 >> 24) & 0xFF); omap_calculate_ecc_bch()
1190 *ecc_code++ = ((bch_val2 >> 16) & 0xFF); omap_calculate_ecc_bch()
1191 *ecc_code++ = ((bch_val2 >> 8) & 0xFF); omap_calculate_ecc_bch()
1192 *ecc_code++ = (bch_val2 & 0xFF); omap_calculate_ecc_bch()
1193 *ecc_code++ = ((bch_val1 >> 24) & 0xFF); omap_calculate_ecc_bch()
1194 *ecc_code++ = ((bch_val1 >> 16) & 0xFF); omap_calculate_ecc_bch()
1195 *ecc_code++ = ((bch_val1 >> 8) & 0xFF); omap_calculate_ecc_bch()
1196 *ecc_code++ = (bch_val1 & 0xFF); omap_calculate_ecc_bch()
1202 *ecc_code++ = ((bch_val2 >> 12) & 0xFF); omap_calculate_ecc_bch()
1203 *ecc_code++ = ((bch_val2 >> 4) & 0xFF); omap_calculate_ecc_bch()
1204 *ecc_code++ = ((bch_val2 & 0xF) << 4) | omap_calculate_ecc_bch()
1206 *ecc_code++ = ((bch_val1 >> 20) & 0xFF); omap_calculate_ecc_bch()
1207 *ecc_code++ = ((bch_val1 >> 12) & 0xFF); omap_calculate_ecc_bch()
1208 *ecc_code++ = ((bch_val1 >> 4) & 0xFF); omap_calculate_ecc_bch()
1209 *ecc_code++ = ((bch_val1 & 0xF) << 4); omap_calculate_ecc_bch()
1213 ecc_code[0] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1214 ecc_code[1] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1216 ecc_code[2] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1217 ecc_code[3] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1218 ecc_code[4] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1219 ecc_code[5] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1221 ecc_code[6] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1222 ecc_code[7] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1223 ecc_code[8] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1224 ecc_code[9] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1226 ecc_code[10] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1227 ecc_code[11] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1228 ecc_code[12] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1229 ecc_code[13] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1231 ecc_code[14] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1232 ecc_code[15] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1233 ecc_code[16] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1234 ecc_code[17] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1236 ecc_code[18] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1237 ecc_code[19] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1238 ecc_code[20] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1239 ecc_code[21] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1241 ecc_code[22] = ((val >> 24) & 0xFF); omap_calculate_ecc_bch()
1242 ecc_code[23] = ((val >> 16) & 0xFF); omap_calculate_ecc_bch()
1243 ecc_code[24] = ((val >> 8) & 0xFF); omap_calculate_ecc_bch()
1244 ecc_code[25] = ((val >> 0) & 0xFF); omap_calculate_ecc_bch()
1549 uint8_t *ecc_code = chip->buffers->ecccode; omap_read_page_bch() local
1569 memcpy(ecc_code, &chip->oob_poi[eccpos[0]], chip->ecc.total); omap_read_page_bch()
1571 stat = chip->ecc.correct(mtd, buf, ecc_code, ecc_calc); omap_read_page_bch()
928 omap_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) omap_calculate_ecc() argument
H A Dsharpsl.c97 static int sharpsl_nand_calculate_ecc(struct mtd_info *mtd, const u_char * dat, u_char * ecc_code) sharpsl_nand_calculate_ecc() argument
100 ecc_code[0] = ~readb(sharpsl->io + ECCLPUB); sharpsl_nand_calculate_ecc()
101 ecc_code[1] = ~readb(sharpsl->io + ECCLPLB); sharpsl_nand_calculate_ecc()
102 ecc_code[2] = (~readb(sharpsl->io + ECCCP) << 2) | 0x03; sharpsl_nand_calculate_ecc()
H A Ddavinci_nand.c178 const u_char *dat, u_char *ecc_code) nand_davinci_calculate_1bit()
185 ecc_code[0] = (u_char)(ecc24); nand_davinci_calculate_1bit()
186 ecc_code[1] = (u_char)(ecc24 >> 8); nand_davinci_calculate_1bit()
187 ecc_code[2] = (u_char)(ecc24 >> 16); nand_davinci_calculate_1bit()
271 const u_char *dat, u_char *ecc_code) nand_davinci_calculate_4bit()
280 * ecc_code is not needed. nand_davinci_calculate_4bit()
294 *ecc_code++ = p[0] & 0xff; nand_davinci_calculate_4bit()
295 *ecc_code++ = ((p[0] >> 8) & 0x03) | ((p[0] >> 14) & 0xfc); nand_davinci_calculate_4bit()
296 *ecc_code++ = ((p[0] >> 22) & 0x0f) | ((p[1] << 4) & 0xf0); nand_davinci_calculate_4bit()
297 *ecc_code++ = ((p[1] >> 4) & 0x3f) | ((p[1] >> 10) & 0xc0); nand_davinci_calculate_4bit()
298 *ecc_code++ = (p[1] >> 18) & 0xff; nand_davinci_calculate_4bit()
305 * hardware plus the ecc_code computed when it was first written.
308 u_char *data, u_char *ecc_code, u_char *null) nand_davinci_correct_4bit()
321 if (ecc_code[i] != 0xff) nand_davinci_correct_4bit()
330 if (WARN_ON(0x01 & (unsigned) ecc_code)) nand_davinci_correct_4bit()
332 ecc16 = (unsigned short *)ecc_code; nand_davinci_correct_4bit()
177 nand_davinci_calculate_1bit(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) nand_davinci_calculate_1bit() argument
270 nand_davinci_calculate_4bit(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) nand_davinci_calculate_4bit() argument
307 nand_davinci_correct_4bit(struct mtd_info *mtd, u_char *data, u_char *ecc_code, u_char *null) nand_davinci_correct_4bit() argument
H A Dndfc.c100 const u_char *dat, u_char *ecc_code) ndfc_calculate_ecc()
110 ecc_code[0] = p[1]; ndfc_calculate_ecc()
111 ecc_code[1] = p[2]; ndfc_calculate_ecc()
112 ecc_code[2] = p[3]; ndfc_calculate_ecc()
99 ndfc_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) ndfc_calculate_ecc() argument
H A Dtmio_nand.c269 u_char *ecc_code) tmio_nand_calculate_ecc()
277 ecc_code[1] = ecc; /* 000-255 LP7-0 */ tmio_nand_calculate_ecc()
278 ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */ tmio_nand_calculate_ecc()
280 ecc_code[2] = ecc; /* 000-255 CP5-0,11b */ tmio_nand_calculate_ecc()
281 ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */ tmio_nand_calculate_ecc()
283 ecc_code[3] = ecc; /* 256-511 LP15-8 */ tmio_nand_calculate_ecc()
284 ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */ tmio_nand_calculate_ecc()
268 tmio_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) tmio_nand_calculate_ecc() argument
H A Dtxx9ndfmc.c175 uint8_t *ecc_code) txx9ndfmc_calculate_ecc()
186 ecc_code[1] = txx9ndfmc_read(dev, TXX9_NDFDTR); txx9ndfmc_calculate_ecc()
187 ecc_code[0] = txx9ndfmc_read(dev, TXX9_NDFDTR); txx9ndfmc_calculate_ecc()
188 ecc_code[2] = txx9ndfmc_read(dev, TXX9_NDFDTR); txx9ndfmc_calculate_ecc()
189 ecc_code += 3; txx9ndfmc_calculate_ecc()
174 txx9ndfmc_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat, uint8_t *ecc_code) txx9ndfmc_calculate_ecc() argument
H A Ds3c2410.c587 u_char *ecc_code) s3c2410_nand_calculate_ecc()
591 ecc_code[0] = readb(info->regs + S3C2410_NFECC + 0); s3c2410_nand_calculate_ecc()
592 ecc_code[1] = readb(info->regs + S3C2410_NFECC + 1); s3c2410_nand_calculate_ecc()
593 ecc_code[2] = readb(info->regs + S3C2410_NFECC + 2); s3c2410_nand_calculate_ecc()
595 pr_debug("%s: returning ecc %*phN\n", __func__, 3, ecc_code); s3c2410_nand_calculate_ecc()
601 u_char *ecc_code) s3c2412_nand_calculate_ecc()
606 ecc_code[0] = ecc; s3c2412_nand_calculate_ecc()
607 ecc_code[1] = ecc >> 8; s3c2412_nand_calculate_ecc()
608 ecc_code[2] = ecc >> 16; s3c2412_nand_calculate_ecc()
610 pr_debug("%s: returning ecc %*phN\n", __func__, 3, ecc_code); s3c2412_nand_calculate_ecc()
616 u_char *ecc_code) s3c2440_nand_calculate_ecc()
621 ecc_code[0] = ecc; s3c2440_nand_calculate_ecc()
622 ecc_code[1] = ecc >> 8; s3c2440_nand_calculate_ecc()
623 ecc_code[2] = ecc >> 16; s3c2440_nand_calculate_ecc()
586 s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) s3c2410_nand_calculate_ecc() argument
600 s3c2412_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) s3c2412_nand_calculate_ecc() argument
615 s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) s3c2440_nand_calculate_ecc() argument
H A Dcs553x_nand.c170 static int cs_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) cs_calculate_ecc() argument
178 ecc_code[1] = ecc >> 8; cs_calculate_ecc()
179 ecc_code[0] = ecc >> 16; cs_calculate_ecc()
180 ecc_code[2] = ecc >> 24; cs_calculate_ecc()
H A Djz4740_nand.c166 uint8_t *ecc_code) jz_nand_calculate_ecc_rs()
190 ecc_code[i] = readb(nand->base + JZ_REG_NAND_PAR0 + i); jz_nand_calculate_ecc_rs()
194 if (memcmp(ecc_code, empty_block_ecc, 9) == 0) jz_nand_calculate_ecc_rs()
195 memset(ecc_code, 0xff, 9); jz_nand_calculate_ecc_rs()
165 jz_nand_calculate_ecc_rs(struct mtd_info *mtd, const uint8_t *dat, uint8_t *ecc_code) jz_nand_calculate_ecc_rs() argument
H A Dbf5xx_nand.c329 const u_char *dat, u_char *ecc_code) bf5xx_nand_calculate_ecc()
346 memcpy(ecc_code, p, 3); bf5xx_nand_calculate_ecc()
354 /* second 3 bytes in ecc_code for second 256 bf5xx_nand_calculate_ecc()
358 memcpy((ecc_code + 3), p, 3); bf5xx_nand_calculate_ecc()
328 bf5xx_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) bf5xx_nand_calculate_ecc() argument
H A Ddiskonchip.c844 static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, unsigned char *ecc_code) doc200x_calculate_ecc() argument
871 ecc_code[i] = ReadDOC_(docptr, DoC_Mplus_ECCSyndrome0 + i); doc200x_calculate_ecc()
873 ecc_code[i] = ReadDOC_(docptr, DoC_ECCSyndrome0 + i); doc200x_calculate_ecc()
874 if (ecc_code[i] != empty_write_ecc[i]) doc200x_calculate_ecc()
898 memset(ecc_code, 0xff, 6); doc200x_calculate_ecc()
H A Datmel_nand.c1305 * ecc_code: buffer for ECC
1308 const u_char *dat, unsigned char *ecc_code) atmel_nand_calculate()
1317 ecc_code[0] = ecc_value & 0xFF; atmel_nand_calculate()
1318 ecc_code[1] = (ecc_value >> 8) & 0xFF; atmel_nand_calculate()
1323 ecc_code[2] = ecc_value & 0xFF; atmel_nand_calculate()
1324 ecc_code[3] = (ecc_value >> 8) & 0xFF; atmel_nand_calculate()
1307 atmel_nand_calculate(struct mtd_info *mtd, const u_char *dat, unsigned char *ecc_code) atmel_nand_calculate() argument
H A Dr852.c435 uint8_t *ecc_code) r852_ecc_calculate()
438 struct sm_oob *oob = (struct sm_oob *)ecc_code; r852_ecc_calculate()
434 r852_ecc_calculate(struct mtd_info *mtd, const uint8_t *dat, uint8_t *ecc_code) r852_ecc_calculate() argument
H A Dfsmc_nand.c723 uint8_t *ecc_code = chip->buffers->ecccode; fsmc_read_page_hwecc() local
757 memcpy(&ecc_code[i], oob, chip->ecc.bytes); fsmc_read_page_hwecc()
760 stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); fsmc_read_page_hwecc()
H A Dnand_base.c1183 uint8_t *ecc_code = chip->buffers->ecccode; nand_read_page_swecc() local
1193 ecc_code[i] = chip->oob_poi[eccpos[i]]; nand_read_page_swecc()
1201 stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); nand_read_page_swecc()
1323 uint8_t *ecc_code = chip->buffers->ecccode; nand_read_page_hwecc() local
1335 ecc_code[i] = chip->oob_poi[eccpos[i]]; nand_read_page_hwecc()
1343 stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); nand_read_page_hwecc()
1375 uint8_t *ecc_code = chip->buffers->ecccode; nand_read_page_hwecc_oob_first() local
1386 ecc_code[i] = chip->oob_poi[eccpos[i]]; nand_read_page_hwecc_oob_first()
1395 stat = chip->ecc.correct(mtd, p, &ecc_code[i], NULL); nand_read_page_hwecc_oob_first()
H A Dmxc_nand.c685 u_char *ecc_code) mxc_nand_calculate_ecc()
684 mxc_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) mxc_nand_calculate_ecc() argument

Completed in 679 milliseconds