Lines Matching refs:ecc
1390 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_erase_write_errors() local
1394 num_cw = command == NAND_CMD_PAGEPROG ? ecc->steps : 1; in parse_erase_write_errors()
1440 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_command() local
1475 update_rw_regs(host, ecc->steps, true); in qcom_nandc_command()
1588 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_cw_raw() local
1600 data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1); in qcom_nandc_read_cw_raw()
1603 if (cw == (ecc->steps - 1)) { in qcom_nandc_read_cw_raw()
1604 data_size2 = ecc->size - data_size1 - in qcom_nandc_read_cw_raw()
1605 ((ecc->steps - 1) * 4); in qcom_nandc_read_cw_raw()
1606 oob_size2 = (ecc->steps * 4) + host->ecc_bytes_hw + in qcom_nandc_read_cw_raw()
1671 struct nand_ecc_ctrl *ecc = &chip->ecc; in check_for_erased_page() local
1683 for_each_set_bit(cw, &uncorrectable_cws, ecc->steps) { in check_for_erased_page()
1684 if (cw == (ecc->steps - 1)) { in check_for_erased_page()
1685 data_size = ecc->size - ((ecc->steps - 1) * 4); in check_for_erased_page()
1686 oob_size = (ecc->steps * 4) + host->ecc_bytes_hw; in check_for_erased_page()
1694 cw_oob_buf = oob_buf + (cw * ecc->bytes); in check_for_erased_page()
1708 0, ecc->strength); in check_for_erased_page()
1730 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_read_errors() local
1740 for (i = 0; i < ecc->steps; i++, buf++) { in parse_read_errors()
1744 if (i == (ecc->steps - 1)) { in parse_read_errors()
1745 data_len = ecc->size - ((ecc->steps - 1) << 2); in parse_read_errors()
1746 oob_len = ecc->steps << 2; in parse_read_errors()
1810 oob_buf += oob_len + ecc->bytes; in parse_read_errors()
1833 struct nand_ecc_ctrl *ecc = &chip->ecc; in read_page_ecc() local
1840 for (i = 0; i < ecc->steps; i++) { in read_page_ecc()
1843 if (i == (ecc->steps - 1)) { in read_page_ecc()
1844 data_size = ecc->size - ((ecc->steps - 1) << 2); in read_page_ecc()
1845 oob_size = (ecc->steps << 2) + host->ecc_bytes_hw + in read_page_ecc()
1913 struct nand_ecc_ctrl *ecc = &chip->ecc; in copy_last_cw() local
1924 set_address(host, host->cw_size * (ecc->steps - 1), page); in copy_last_cw()
1963 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_page_raw() local
1967 for (cw = 0; cw < ecc->steps; cw++) { in qcom_nandc_read_page_raw()
1974 oob_buf += ecc->bytes; in qcom_nandc_read_page_raw()
1985 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_oob() local
1992 update_rw_regs(host, ecc->steps, true); in qcom_nandc_read_oob()
2003 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_write_page() local
2016 update_rw_regs(host, ecc->steps, false); in qcom_nandc_write_page()
2019 for (i = 0; i < ecc->steps; i++) { in qcom_nandc_write_page()
2022 if (i == (ecc->steps - 1)) { in qcom_nandc_write_page()
2023 data_size = ecc->size - ((ecc->steps - 1) << 2); in qcom_nandc_write_page()
2024 oob_size = (ecc->steps << 2) + host->ecc_bytes_hw + in qcom_nandc_write_page()
2028 oob_size = ecc->bytes; in qcom_nandc_write_page()
2033 i == (ecc->steps - 1) ? NAND_BAM_NO_EOT : 0); in qcom_nandc_write_page()
2042 if (i == (ecc->steps - 1)) { in qcom_nandc_write_page()
2075 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_write_page_raw() local
2087 update_rw_regs(host, ecc->steps, false); in qcom_nandc_write_page_raw()
2090 for (i = 0; i < ecc->steps; i++) { in qcom_nandc_write_page_raw()
2094 data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1); in qcom_nandc_write_page_raw()
2097 if (i == (ecc->steps - 1)) { in qcom_nandc_write_page_raw()
2098 data_size2 = ecc->size - data_size1 - in qcom_nandc_write_page_raw()
2099 ((ecc->steps - 1) << 2); in qcom_nandc_write_page_raw()
2100 oob_size2 = (ecc->steps << 2) + host->ecc_bytes_hw + in qcom_nandc_write_page_raw()
2152 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_write_oob() local
2161 data_size = ecc->size - ((ecc->steps - 1) << 2); in qcom_nandc_write_oob()
2169 set_address(host, host->cw_size * (ecc->steps - 1), page); in qcom_nandc_write_oob()
2194 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_block_bad() local
2217 bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1); in qcom_nandc_block_bad()
2231 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_block_markbad() local
2248 set_address(host, host->cw_size * (ecc->steps - 1), page); in qcom_nandc_block_markbad()
2416 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nand_ooblayout_ecc() local
2422 oobregion->length = (ecc->bytes * (ecc->steps - 1)) + in qcom_nand_ooblayout_ecc()
2438 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nand_ooblayout_free() local
2443 oobregion->length = ecc->steps * 4; in qcom_nand_ooblayout_free()
2444 oobregion->offset = ((ecc->steps - 1) * ecc->bytes) + host->bbm_size; in qcom_nand_ooblayout_free()
2450 .ecc = qcom_nand_ooblayout_ecc,
2466 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nand_attach_chip() local
2473 ecc->size = NANDC_STEP_SIZE; in qcom_nand_attach_chip()
2488 if (ecc->strength >= 8) { in qcom_nand_attach_chip()
2542 ecc->bytes = host->ecc_bytes_hw + host->spare_bytes + host->bbm_size; in qcom_nand_attach_chip()
2544 ecc->read_page = qcom_nandc_read_page; in qcom_nand_attach_chip()
2545 ecc->read_page_raw = qcom_nandc_read_page_raw; in qcom_nand_attach_chip()
2546 ecc->read_oob = qcom_nandc_read_oob; in qcom_nand_attach_chip()
2547 ecc->write_page = qcom_nandc_write_page; in qcom_nand_attach_chip()
2548 ecc->write_page_raw = qcom_nandc_write_page_raw; in qcom_nand_attach_chip()
2549 ecc->write_oob = qcom_nandc_write_oob; in qcom_nand_attach_chip()
2551 ecc->mode = NAND_ECC_HW; in qcom_nand_attach_chip()
2569 host->cw_size = host->cw_data + ecc->bytes; in qcom_nand_attach_chip()
2621 host->cw_size, host->cw_data, ecc->strength, ecc->bytes, in qcom_nand_attach_chip()