Lines Matching refs:ecc

792 	if (info->nand.ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST &&  in omap_correct_data()
793 info->nand.ecc.size == 2048) in omap_correct_data()
861 val = ((((info->nand.ecc.size >> 1) - 1) << ECCSIZE1_SHIFT) | in omap_enable_hwecc()
916 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch()
936 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch()
949 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch()
1005 int eccbytes = info->nand.ecc.bytes; in _omap_calculate_ecc_bch()
1147 int eccbytes = info->nand.ecc.bytes; in omap_calculate_ecc_bch_multi()
1178 for (i = 0; i < info->nand.ecc.size; i++) { in erased_sector_bitflips()
1180 if (flip_bits > info->nand.ecc.strength) in erased_sector_bitflips()
1184 for (i = 0; i < info->nand.ecc.bytes - 1; i++) { in erased_sector_bitflips()
1186 if (flip_bits > info->nand.ecc.strength) in erased_sector_bitflips()
1195 memset(data, 0xFF, info->nand.ecc.size); in erased_sector_bitflips()
1196 memset(oob, 0xFF, info->nand.ecc.bytes); in erased_sector_bitflips()
1217 struct nand_ecc_ctrl *ecc = &info->nand.ecc; in omap_elm_correct_data() local
1234 actual_eccbytes = ecc->bytes - 1; in omap_elm_correct_data()
1239 actual_eccbytes = ecc->bytes - 1; in omap_elm_correct_data()
1243 actual_eccbytes = ecc->bytes; in omap_elm_correct_data()
1276 buf = &data[info->nand.ecc.size * i]; in omap_elm_correct_data()
1304 calc_ecc += ecc->bytes; in omap_elm_correct_data()
1305 read_ecc += ecc->bytes; in omap_elm_correct_data()
1336 error_max = (ecc->size + actual_eccbytes) * 8; in omap_elm_correct_data()
1368 data += ecc->size; in omap_elm_correct_data()
1369 spare_ecc += ecc->bytes; in omap_elm_correct_data()
1389 uint8_t *ecc_calc = chip->ecc.calc_buf; in omap_write_page_bch()
1399 chip->ecc.hwctl(chip, NAND_ECC_WRITE); in omap_write_page_bch()
1443 u8 *ecc_calc = chip->ecc.calc_buf; in omap_write_subpage_bch()
1444 int ecc_size = chip->ecc.size; in omap_write_subpage_bch()
1445 int ecc_bytes = chip->ecc.bytes; in omap_write_subpage_bch()
1463 chip->ecc.hwctl(chip, NAND_ECC_WRITE); in omap_write_subpage_bch()
1524 uint8_t *ecc_calc = chip->ecc.calc_buf; in omap_read_page_bch()
1525 uint8_t *ecc_code = chip->ecc.code_buf; in omap_read_page_bch()
1535 chip->ecc.hwctl(chip, NAND_ECC_READ); in omap_read_page_bch()
1568 stat = chip->ecc.correct(chip, in omap_read_page_bch()
1739 oobregion->length = chip->ecc.total; in omap_ooblayout_ecc()
1758 off += chip->ecc.total; in omap_ooblayout_free()
1769 .ecc = omap_ooblayout_ecc,
1820 .ecc = omap_sw_ooblayout_ecc,
1926 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT; in omap_nand_attach_chip()
1927 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; in omap_nand_attach_chip()
1935 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
1936 chip->ecc.bytes = 3; in omap_nand_attach_chip()
1937 chip->ecc.size = 512; in omap_nand_attach_chip()
1938 chip->ecc.strength = 1; in omap_nand_attach_chip()
1939 chip->ecc.calculate = omap_calculate_ecc; in omap_nand_attach_chip()
1940 chip->ecc.hwctl = omap_enable_hwecc; in omap_nand_attach_chip()
1941 chip->ecc.correct = omap_correct_data; in omap_nand_attach_chip()
1943 oobbytes_per_step = chip->ecc.bytes; in omap_nand_attach_chip()
1952 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
1953 chip->ecc.size = 512; in omap_nand_attach_chip()
1954 chip->ecc.bytes = 7; in omap_nand_attach_chip()
1955 chip->ecc.strength = 4; in omap_nand_attach_chip()
1956 chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_attach_chip()
1957 chip->ecc.correct = rawnand_sw_bch_correct; in omap_nand_attach_chip()
1958 chip->ecc.calculate = omap_calculate_ecc_bch_sw; in omap_nand_attach_chip()
1961 oobbytes_per_step = chip->ecc.bytes + 1; in omap_nand_attach_chip()
1972 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
1973 chip->ecc.size = 512; in omap_nand_attach_chip()
1975 chip->ecc.bytes = 7 + 1; in omap_nand_attach_chip()
1976 chip->ecc.strength = 4; in omap_nand_attach_chip()
1977 chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_attach_chip()
1978 chip->ecc.correct = omap_elm_correct_data; in omap_nand_attach_chip()
1979 chip->ecc.read_page = omap_read_page_bch; in omap_nand_attach_chip()
1980 chip->ecc.write_page = omap_write_page_bch; in omap_nand_attach_chip()
1981 chip->ecc.write_subpage = omap_write_subpage_bch; in omap_nand_attach_chip()
1983 oobbytes_per_step = chip->ecc.bytes; in omap_nand_attach_chip()
1989 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
1990 chip->ecc.size = 512; in omap_nand_attach_chip()
1991 chip->ecc.bytes = 13; in omap_nand_attach_chip()
1992 chip->ecc.strength = 8; in omap_nand_attach_chip()
1993 chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_attach_chip()
1994 chip->ecc.correct = rawnand_sw_bch_correct; in omap_nand_attach_chip()
1995 chip->ecc.calculate = omap_calculate_ecc_bch_sw; in omap_nand_attach_chip()
1998 oobbytes_per_step = chip->ecc.bytes + 1; in omap_nand_attach_chip()
2009 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
2010 chip->ecc.size = 512; in omap_nand_attach_chip()
2012 chip->ecc.bytes = 13 + 1; in omap_nand_attach_chip()
2013 chip->ecc.strength = 8; in omap_nand_attach_chip()
2014 chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_attach_chip()
2015 chip->ecc.correct = omap_elm_correct_data; in omap_nand_attach_chip()
2016 chip->ecc.read_page = omap_read_page_bch; in omap_nand_attach_chip()
2017 chip->ecc.write_page = omap_write_page_bch; in omap_nand_attach_chip()
2018 chip->ecc.write_subpage = omap_write_subpage_bch; in omap_nand_attach_chip()
2020 oobbytes_per_step = chip->ecc.bytes; in omap_nand_attach_chip()
2026 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; in omap_nand_attach_chip()
2027 chip->ecc.size = 512; in omap_nand_attach_chip()
2028 chip->ecc.bytes = 26; in omap_nand_attach_chip()
2029 chip->ecc.strength = 16; in omap_nand_attach_chip()
2030 chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_attach_chip()
2031 chip->ecc.correct = omap_elm_correct_data; in omap_nand_attach_chip()
2032 chip->ecc.read_page = omap_read_page_bch; in omap_nand_attach_chip()
2033 chip->ecc.write_page = omap_write_page_bch; in omap_nand_attach_chip()
2034 chip->ecc.write_subpage = omap_write_subpage_bch; in omap_nand_attach_chip()
2036 oobbytes_per_step = chip->ecc.bytes; in omap_nand_attach_chip()
2045 chip->ecc.steps = mtd->writesize / chip->ecc.size; in omap_nand_attach_chip()
2046 info->neccpg = chip->ecc.steps / ERROR_VECTOR_MAX; in omap_nand_attach_chip()
2051 info->nsteps_per_eccpg = chip->ecc.steps; in omap_nand_attach_chip()
2053 info->eccpg_size = info->nsteps_per_eccpg * chip->ecc.size; in omap_nand_attach_chip()
2054 info->eccpg_bytes = info->nsteps_per_eccpg * chip->ecc.bytes; in omap_nand_attach_chip()
2057 info->nsteps_per_eccpg, chip->ecc.size, in omap_nand_attach_chip()
2058 chip->ecc.bytes); in omap_nand_attach_chip()
2065 (mtd->writesize / chip->ecc.size)); in omap_nand_attach_chip()