Lines Matching refs:ecc
169 .ecc = lpc32xx_ooblayout_ecc,
407 static void lpc32xx_slc_ecc_copy(uint8_t *spare, const uint32_t *ecc, int count) in lpc32xx_slc_ecc_copy() argument
412 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy()
531 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_xfer()
534 dma_buf + i * chip->ecc.size, in lpc32xx_xfer()
535 mtd->writesize / chip->ecc.steps, dir); in lpc32xx_xfer()
540 if (i == chip->ecc.steps - 1) in lpc32xx_xfer()
572 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()
630 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_nand_read_page_syndrome()
631 stat = chip->ecc.correct(chip, buf, oobecc, in lpc32xx_nand_read_page_syndrome()
632 &tmpecc[i * chip->ecc.bytes]); in lpc32xx_nand_read_page_syndrome()
638 buf += chip->ecc.size; in lpc32xx_nand_read_page_syndrome()
639 oobecc += chip->ecc.bytes; in lpc32xx_nand_read_page_syndrome()
659 chip->legacy.read_buf(chip, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_read_page_raw_syndrome()
682 error = lpc32xx_xfer(mtd, (uint8_t *)buf, chip->ecc.steps, 0); in lpc32xx_nand_write_page_syndrome()
695 lpc32xx_slc_ecc_copy(pb, (uint32_t *)host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_write_page_syndrome()
715 chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_write_page_raw_syndrome()
790 chip->ecc.size = 256; in lpc32xx_nand_attach_chip()
791 chip->ecc.bytes = LPC32XX_SLC_DEV_ECC_BYTES; in lpc32xx_nand_attach_chip()
792 chip->ecc.prepad = 0; in lpc32xx_nand_attach_chip()
793 chip->ecc.postpad = 0; in lpc32xx_nand_attach_chip()
884 chip->ecc.mode = NAND_ECC_HW_SYNDROME; in lpc32xx_nand_probe()
888 chip->ecc.read_page_raw = lpc32xx_nand_read_page_raw_syndrome; in lpc32xx_nand_probe()
889 chip->ecc.read_page = lpc32xx_nand_read_page_syndrome; in lpc32xx_nand_probe()
890 chip->ecc.write_page_raw = lpc32xx_nand_write_page_raw_syndrome; in lpc32xx_nand_probe()
891 chip->ecc.write_page = lpc32xx_nand_write_page_syndrome; in lpc32xx_nand_probe()
892 chip->ecc.write_oob = lpc32xx_nand_write_oob_syndrome; in lpc32xx_nand_probe()
893 chip->ecc.read_oob = lpc32xx_nand_read_oob_syndrome; in lpc32xx_nand_probe()
894 chip->ecc.calculate = lpc32xx_nand_ecc_calculate; in lpc32xx_nand_probe()
895 chip->ecc.correct = nand_correct_data; in lpc32xx_nand_probe()
896 chip->ecc.strength = 1; in lpc32xx_nand_probe()
897 chip->ecc.hwctl = lpc32xx_nand_ecc_enable; in lpc32xx_nand_probe()