Lines Matching refs:ecc
405 static void lpc32xx_slc_ecc_copy(uint8_t *spare, const uint32_t *ecc, int count) in lpc32xx_slc_ecc_copy() argument
410 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy()
529 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_xfer()
532 dma_buf + i * chip->ecc.size, in lpc32xx_xfer()
533 mtd->writesize / chip->ecc.steps, dir); in lpc32xx_xfer()
538 if (i == chip->ecc.steps - 1) in lpc32xx_xfer()
570 host->ecc_buf[chip->ecc.steps - 1] = in lpc32xx_xfer()
612 status = lpc32xx_xfer(mtd, buf, chip->ecc.steps, 1); in lpc32xx_nand_read_page_syndrome()
618 lpc32xx_slc_ecc_copy(tmpecc, (uint32_t *) host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_read_page_syndrome()
621 oobecc = chip->oob_poi + chip->ecc.layout->eccpos[0]; in lpc32xx_nand_read_page_syndrome()
623 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_nand_read_page_syndrome()
624 stat = chip->ecc.correct(mtd, buf, oobecc, in lpc32xx_nand_read_page_syndrome()
625 &tmpecc[i * chip->ecc.bytes]); in lpc32xx_nand_read_page_syndrome()
631 buf += chip->ecc.size; in lpc32xx_nand_read_page_syndrome()
632 oobecc += chip->ecc.bytes; in lpc32xx_nand_read_page_syndrome()
651 chip->read_buf(mtd, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_read_page_raw_syndrome()
666 uint8_t *pb = chip->oob_poi + chip->ecc.layout->eccpos[0]; in lpc32xx_nand_write_page_syndrome()
670 error = lpc32xx_xfer(mtd, (uint8_t *)buf, chip->ecc.steps, 0); in lpc32xx_nand_write_page_syndrome()
678 lpc32xx_slc_ecc_copy(pb, (uint32_t *)host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_write_page_syndrome()
695 chip->write_buf(mtd, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_write_page_raw_syndrome()
828 chip->ecc.mode = NAND_ECC_HW_SYNDROME; in lpc32xx_nand_probe()
832 chip->ecc.read_page_raw = lpc32xx_nand_read_page_raw_syndrome; in lpc32xx_nand_probe()
833 chip->ecc.read_page = lpc32xx_nand_read_page_syndrome; in lpc32xx_nand_probe()
834 chip->ecc.write_page_raw = lpc32xx_nand_write_page_raw_syndrome; in lpc32xx_nand_probe()
835 chip->ecc.write_page = lpc32xx_nand_write_page_syndrome; in lpc32xx_nand_probe()
836 chip->ecc.write_oob = lpc32xx_nand_write_oob_syndrome; in lpc32xx_nand_probe()
837 chip->ecc.read_oob = lpc32xx_nand_read_oob_syndrome; in lpc32xx_nand_probe()
838 chip->ecc.calculate = lpc32xx_nand_ecc_calculate; in lpc32xx_nand_probe()
839 chip->ecc.correct = nand_correct_data; in lpc32xx_nand_probe()
840 chip->ecc.strength = 1; in lpc32xx_nand_probe()
841 chip->ecc.hwctl = lpc32xx_nand_ecc_enable; in lpc32xx_nand_probe()
876 chip->ecc.layout = &lpc32xx_nand_oob_16; in lpc32xx_nand_probe()
879 chip->ecc.size = 256; in lpc32xx_nand_probe()
880 chip->ecc.bytes = LPC32XX_SLC_DEV_ECC_BYTES; in lpc32xx_nand_probe()
881 chip->ecc.prepad = chip->ecc.postpad = 0; in lpc32xx_nand_probe()