Lines Matching refs:ecc

408 static void lpc32xx_slc_ecc_copy(uint8_t *spare, const uint32_t *ecc, int count)  in lpc32xx_slc_ecc_copy()  argument
413 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy()
532 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_xfer()
535 dma_buf + i * chip->ecc.size, in lpc32xx_xfer()
536 mtd->writesize / chip->ecc.steps, dir); in lpc32xx_xfer()
541 if (i == chip->ecc.steps - 1) in lpc32xx_xfer()
573 host->ecc_buf[chip->ecc.steps - 1] = in lpc32xx_xfer()
615 status = lpc32xx_xfer(mtd, buf, chip->ecc.steps, 1); in lpc32xx_nand_read_page_syndrome()
621 lpc32xx_slc_ecc_copy(tmpecc, (uint32_t *) host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_read_page_syndrome()
624 oobecc = chip->oob_poi + chip->ecc.layout->eccpos[0]; in lpc32xx_nand_read_page_syndrome()
626 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_nand_read_page_syndrome()
627 stat = chip->ecc.correct(mtd, buf, oobecc, in lpc32xx_nand_read_page_syndrome()
628 &tmpecc[i * chip->ecc.bytes]); in lpc32xx_nand_read_page_syndrome()
634 buf += chip->ecc.size; in lpc32xx_nand_read_page_syndrome()
635 oobecc += chip->ecc.bytes; in lpc32xx_nand_read_page_syndrome()
654 chip->read_buf(mtd, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_read_page_raw_syndrome()
670 uint8_t *pb = chip->oob_poi + chip->ecc.layout->eccpos[0]; in lpc32xx_nand_write_page_syndrome()
674 error = lpc32xx_xfer(mtd, (uint8_t *)buf, chip->ecc.steps, 0); in lpc32xx_nand_write_page_syndrome()
682 lpc32xx_slc_ecc_copy(pb, (uint32_t *)host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_write_page_syndrome()
699 chip->write_buf(mtd, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_write_page_raw_syndrome()
832 chip->ecc.mode = NAND_ECC_HW_SYNDROME; in lpc32xx_nand_probe()
836 chip->ecc.read_page_raw = lpc32xx_nand_read_page_raw_syndrome; in lpc32xx_nand_probe()
837 chip->ecc.read_page = lpc32xx_nand_read_page_syndrome; in lpc32xx_nand_probe()
838 chip->ecc.write_page_raw = lpc32xx_nand_write_page_raw_syndrome; in lpc32xx_nand_probe()
839 chip->ecc.write_page = lpc32xx_nand_write_page_syndrome; in lpc32xx_nand_probe()
840 chip->ecc.write_oob = lpc32xx_nand_write_oob_syndrome; in lpc32xx_nand_probe()
841 chip->ecc.read_oob = lpc32xx_nand_read_oob_syndrome; in lpc32xx_nand_probe()
842 chip->ecc.calculate = lpc32xx_nand_ecc_calculate; in lpc32xx_nand_probe()
843 chip->ecc.correct = nand_correct_data; in lpc32xx_nand_probe()
844 chip->ecc.strength = 1; in lpc32xx_nand_probe()
845 chip->ecc.hwctl = lpc32xx_nand_ecc_enable; in lpc32xx_nand_probe()
880 chip->ecc.layout = &lpc32xx_nand_oob_16; in lpc32xx_nand_probe()
883 chip->ecc.size = 256; in lpc32xx_nand_probe()
884 chip->ecc.bytes = LPC32XX_SLC_DEV_ECC_BYTES; in lpc32xx_nand_probe()
885 chip->ecc.prepad = chip->ecc.postpad = 0; in lpc32xx_nand_probe()