Lines Matching refs:ecc
317 /* default to soft ecc, that should work everywhere */
321 interface->ecc.necc_code_size = 3;
322 interface->ecc.necc_block_size = 256;
323 interface->ecc.necc_type = NAND_ECC_TYPE_SW;
370 struct nand_ecc *ecc;
443 ecc = chip->nc_ecc = &sc->nand_if->ecc;
446 * calculate the place of ecc data in oob
451 ecc->necc_offset = 0;
454 ecc->necc_offset = 0;
457 ecc->necc_offset = 0;
460 ecc->necc_offset = 40;
463 ecc->necc_offset = 80;
469 ecc->necc_steps = chip->nc_page_size / ecc->necc_block_size;
470 ecc->necc_size = ecc->necc_steps * ecc->necc_code_size;
473 if (ecc->necc_offset + ecc->necc_size > chip->nc_spare_size) {
479 chip->nc_ecc_cache = kmem_zalloc(ecc->necc_size, KM_SLEEP);
680 /* read a page with ecc correction, default implementation */
687 uint8_t *ecc;
718 ecc = chip->nc_oob_cache + chip->nc_ecc->necc_offset;
720 /* useful for debugging new ecc drivers */
722 printf("dumping ecc %d\n--------------\n", chip->nc_ecc->necc_steps);
726 printf("%.2hhx", ecc[e+b]);
738 result = nand_ecc_correct(self, data + b, ecc + e,
776 uint8_t *ecc;
785 ecc = chip->nc_oob_cache + chip->nc_ecc->necc_offset;
793 nand_ecc_compute(self, data + b, ecc + e);
795 /* write oob with ecc correction code */
802 nand_ecc_compute(self, data + b, ecc + e);
804 /* write oob with ecc correction code */
813 /* for debugging ecc */
815 printf("dumping ecc %d\n--------------\n", chip->nc_ecc->necc_steps);
819 printf("%.2hhx", ecc[e+b]);