Lines Matching refs:ecc

467 				uint8_t *ecc)  in fsmc_read_hwecc_ecc4()  argument
489 ecc[0] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4()
490 ecc[1] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc4()
491 ecc[2] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4()
492 ecc[3] = (uint8_t) (ecc_tmp >> 24); in fsmc_read_hwecc_ecc4()
495 ecc[4] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4()
496 ecc[5] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc4()
497 ecc[6] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4()
498 ecc[7] = (uint8_t) (ecc_tmp >> 24); in fsmc_read_hwecc_ecc4()
501 ecc[8] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4()
502 ecc[9] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc4()
503 ecc[10] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4()
504 ecc[11] = (uint8_t) (ecc_tmp >> 24); in fsmc_read_hwecc_ecc4()
507 ecc[12] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4()
518 uint8_t *ecc) in fsmc_read_hwecc_ecc1() argument
527 ecc[0] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc1()
528 ecc[1] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc1()
529 ecc[2] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc1()
718 int i, j, s, stat, eccsize = chip->ecc.size; in fsmc_read_page_hwecc()
719 int eccbytes = chip->ecc.bytes; in fsmc_read_page_hwecc()
720 int eccsteps = chip->ecc.steps; in fsmc_read_page_hwecc()
736 chip->ecc.hwctl(mtd, NAND_ECC_READ); in fsmc_read_page_hwecc()
757 memcpy(&ecc_code[i], oob, chip->ecc.bytes); in fsmc_read_page_hwecc()
758 chip->ecc.calculate(mtd, p, &ecc_calc[i]); in fsmc_read_page_hwecc()
760 stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); in fsmc_read_page_hwecc()
816 int bits_ecc = count_written_bits(read_ecc, chip->ecc.bytes, 8); in fsmc_bch8_correct_data()
817 int bits_data = count_written_bits(dat, chip->ecc.size, 8); in fsmc_bch8_correct_data()
821 memset(dat, 0xff, chip->ecc.size); in fsmc_bch8_correct_data()
856 if (err_idx[i] < chip->ecc.size * 8) { in fsmc_bch8_correct_data()
1030 nand->ecc.mode = NAND_ECC_HW; in fsmc_nand_probe()
1031 nand->ecc.hwctl = fsmc_enable_hwecc; in fsmc_nand_probe()
1032 nand->ecc.size = 512; in fsmc_nand_probe()
1073 nand->ecc.read_page = fsmc_read_page_hwecc; in fsmc_nand_probe()
1074 nand->ecc.calculate = fsmc_read_hwecc_ecc4; in fsmc_nand_probe()
1075 nand->ecc.correct = fsmc_bch8_correct_data; in fsmc_nand_probe()
1076 nand->ecc.bytes = 13; in fsmc_nand_probe()
1077 nand->ecc.strength = 8; in fsmc_nand_probe()
1092 nand->ecc.layout = &fsmc_ecc4_16_layout; in fsmc_nand_probe()
1096 nand->ecc.layout = &fsmc_ecc4_64_layout; in fsmc_nand_probe()
1100 nand->ecc.layout = &fsmc_ecc4_128_layout; in fsmc_nand_probe()
1104 nand->ecc.layout = &fsmc_ecc4_224_layout; in fsmc_nand_probe()
1108 nand->ecc.layout = &fsmc_ecc4_256_layout; in fsmc_nand_probe()
1118 switch (nand->ecc.mode) { in fsmc_nand_probe()
1121 nand->ecc.calculate = fsmc_read_hwecc_ecc1; in fsmc_nand_probe()
1122 nand->ecc.correct = nand_correct_data; in fsmc_nand_probe()
1123 nand->ecc.bytes = 3; in fsmc_nand_probe()
1124 nand->ecc.strength = 1; in fsmc_nand_probe()
1140 if (nand->ecc.mode != NAND_ECC_SOFT_BCH) { in fsmc_nand_probe()
1143 nand->ecc.layout = &fsmc_ecc1_16_layout; in fsmc_nand_probe()
1146 nand->ecc.layout = &fsmc_ecc1_64_layout; in fsmc_nand_probe()
1149 nand->ecc.layout = &fsmc_ecc1_128_layout; in fsmc_nand_probe()