Lines Matching refs:cw
765 static bool qcom_nandc_is_last_cw(struct nand_ecc_ctrl *ecc, int cw) in qcom_nandc_is_last_cw() argument
767 return cw == (ecc->steps - 1); in qcom_nandc_is_last_cw()
771 static void nandc_set_read_loc(struct nand_chip *chip, int cw, int reg, in nandc_set_read_loc() argument
778 if (nandc->props->qpic_v2 && qcom_nandc_is_last_cw(ecc, cw)) in nandc_set_read_loc()
783 if (nandc->props->qpic_v2 && qcom_nandc_is_last_cw(ecc, cw)) in nandc_set_read_loc()
811 static void update_rw_regs(struct qcom_nand_host *host, int num_cw, bool read, int cw) in update_rw_regs() argument
851 nandc_set_read_loc(chip, cw, 0, 0, host->use_ecc ? in update_rw_regs()
1237 config_nand_cw_read(struct nand_chip *chip, bool use_ecc, int cw) in config_nand_cw_read() argument
1244 if (nandc->props->qpic_v2 && qcom_nandc_is_last_cw(ecc, cw)) in config_nand_cw_read()
1268 bool use_ecc, int cw) in config_nand_single_cw_page_read() argument
1271 config_nand_cw_read(chip, use_ecc, cw); in config_nand_single_cw_page_read()
1464 u8 *data_buf, u8 *oob_buf, int page, int cw) in qcom_nandc_read_cw_raw() argument
1471 int raw_cw = cw; in qcom_nandc_read_cw_raw()
1483 set_address(host, host->cw_size * cw, page); in qcom_nandc_read_cw_raw()
1490 if (qcom_nandc_is_last_cw(ecc, cw) && !host->codeword_fixup) { in qcom_nandc_read_cw_raw()
1501 nandc_set_read_loc(chip, cw, 0, read_loc, data_size1, 0); in qcom_nandc_read_cw_raw()
1504 nandc_set_read_loc(chip, cw, 1, read_loc, oob_size1, 0); in qcom_nandc_read_cw_raw()
1507 nandc_set_read_loc(chip, cw, 2, read_loc, data_size2, 0); in qcom_nandc_read_cw_raw()
1510 nandc_set_read_loc(chip, cw, 3, read_loc, oob_size2, 1); in qcom_nandc_read_cw_raw()
1528 dev_err(nandc->dev, "failure to read raw cw %d\n", cw); in qcom_nandc_read_cw_raw()
1559 int cw, data_size, oob_size, ret; in check_for_erased_page() local
1569 for_each_set_bit(cw, &uncorrectable_cws, ecc->steps) { in check_for_erased_page()
1570 if (qcom_nandc_is_last_cw(ecc, cw) && !host->codeword_fixup) { in check_for_erased_page()
1579 cw_data_buf = data_buf + (cw * host->cw_data); in check_for_erased_page()
1580 cw_oob_buf = oob_buf + (cw * ecc->bytes); in check_for_erased_page()
1583 cw_oob_buf, page, cw); in check_for_erased_page()
1919 int cw, ret; in qcom_nandc_read_page_raw() local
1925 for (cw = 0; cw < ecc->steps; cw++) { in qcom_nandc_read_page_raw()
1927 page, cw); in qcom_nandc_read_page_raw()