/linux-master/drivers/mtd/nand/raw/ |
H A D | mxc_nand.c | 126 int (*read_page)(struct nand_chip *chip, void *buf, void *oob, bool ecc, 669 if (chip->ecc.engine_type != NAND_ECC_ENGINE_TYPE_ON_HOST) 687 if (chip->ecc.engine_type != NAND_ECC_ENGINE_TYPE_ON_HOST) 711 bool ecc, int page) 719 host->devtype_data->enable_hwecc(chip, ecc); 744 if (buf && ecc) { 769 void *oob, bool ecc, int page) 778 host->devtype_data->enable_hwecc(chip, ecc); 853 bool ecc, int page) 858 host->devtype_data->enable_hwecc(chip, ecc); 710 mxc_nand_read_page_v1(struct nand_chip *chip, void *buf, void *oob, bool ecc, int page) argument 768 mxc_nand_read_page_v2_v3(struct nand_chip *chip, void *buf, void *oob, bool ecc, int page) argument 852 mxc_nand_write_page(struct nand_chip *chip, const uint8_t *buf, bool ecc, int page) argument [all...] |
H A D | lpc32xx_mlc.c | 134 if (section >= nand_chip->ecc.steps) 137 oobregion->offset = ((section + 1) * 16) - nand_chip->ecc.bytes; 138 oobregion->length = nand_chip->ecc.bytes; 148 if (section >= nand_chip->ecc.steps) 152 oobregion->length = 16 - nand_chip->ecc.bytes; 158 .ecc = lpc32xx_ooblayout_ecc, 649 if (chip->ecc.engine_type != NAND_ECC_ENGINE_TYPE_ON_HOST) 660 chip->ecc.size = 512; 661 chip->ecc.hwctl = lpc32xx_ecc_enable; 662 chip->ecc [all...] |
H A D | pasemi_nand.c | 85 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT && 86 chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 87 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 170 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
H A D | socrates_nand.c | 123 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT && 124 chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 125 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 183 nand_chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
H A D | orion_nand.c | 88 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT && 89 chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 90 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 182 nc->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
H A D | vf610_nfc.c | 516 int flips_threshold = nfc->chip.ecc.strength / 2; 532 return nand_check_erased_ecc_chunk(dat, nfc->chip.ecc.size, oob, 731 if (nfc->chip.ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) { 760 if (chip->ecc.engine_type != NAND_ECC_ENGINE_TYPE_ON_HOST) 768 if (chip->ecc.size != mtd->writesize) { 779 if (chip->ecc.strength == 32) { 781 chip->ecc.bytes = 60; 782 } else if (chip->ecc.strength == 24) { 784 chip->ecc.bytes = 45; 790 chip->ecc [all...] |
H A D | xway_nand.c | 151 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT && 152 chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 153 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 224 data->chip.ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
H A D | nand_onfi.c | 41 struct onfi_ext_ecc_info *ecc; local 92 ecc = (struct onfi_ext_ecc_info *)cursor; 94 if (!ecc->codeword_size) { 99 requirements.strength = ecc->ecc_bits; 100 requirements.step_size = 1 << ecc->codeword_size;
|
H A D | hisi504_nand.c | 189 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_NONE) { 471 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) 534 switch (chip->ecc.strength) { 632 .ecc = hisi_ooblayout_ecc, 644 size = chip->ecc.size; 645 strength = chip->ecc.strength; 647 dev_err(dev, "error ecc size: %d\n", size); 653 dev_err(dev, "ecc size and strength do not match\n"); 657 chip->ecc.size = size; 658 chip->ecc [all...] |
H A D | cafe_nand.c | 361 * cafe_nand_read_page - [REPLACEABLE] hardware ecc syndrome based page read 459 oobregion->length = chip->ecc.total; 472 oobregion->offset = chip->ecc.total; 473 oobregion->length = mtd->oobsize - chip->ecc.total; 479 .ecc = cafe_ooblayout_ecc, 632 cafe->nand.ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST; 633 cafe->nand.ecc.placement = NAND_ECC_PLACEMENT_INTERLEAVED; 634 cafe->nand.ecc.size = mtd->writesize; 635 cafe->nand.ecc.bytes = 14; 636 cafe->nand.ecc [all...] |
H A D | sm_common.c | 51 .ecc = oob_sm_ooblayout_ecc, 95 .ecc = oob_sm_small_ooblayout_ecc,
|
H A D | au1550nd.c | 242 if (chip->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT && 243 chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN) 244 chip->ecc.algo = NAND_ECC_ALGO_HAMMING; 317 this->ecc.engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
|
/linux-master/drivers/usb/storage/ |
H A D | alauda.c | 242 /* compute 3-byte ecc on 256 bytes */ 243 static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) argument 257 /* put 4+4+4 = 12 bits in the ecc */ 259 ecc[0] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); 262 ecc[1] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); 264 ecc[2] = ecc2[par]; 267 static int nand_compare_ecc(unsigned char *data, unsigned char *ecc) argument 269 return (data[0] == ecc[0] && data[1] == ecc[1] && data[2] == ecc[ 272 nand_store_ecc(unsigned char *data, unsigned char *ecc) argument 813 unsigned char ecc[3]; local [all...] |
H A D | sddr09.c | 211 /* compute 3-byte ecc on 256 bytes */ 212 static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) { argument 225 /* put 4+4+4 = 12 bits in the ecc */ 227 ecc[0] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); 230 ecc[1] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); 232 ecc[2] = ecc2[par]; 235 static int nand_compare_ecc(unsigned char *data, unsigned char *ecc) { argument 236 return (data[0] == ecc[0] && data[1] == ecc[1] && data[2] == ecc[ 239 nand_store_ecc(unsigned char *data, unsigned char *ecc) argument 860 unsigned char ecc[3]; local [all...] |
/linux-master/drivers/mtd/nand/raw/brcmnand/ |
H A D | brcmnand.c | 771 /* v7.2 has different ecc level shift in the acc register */ 1097 chip->ecc.strength = ecc_level * 2; 1099 chip->ecc.strength = 1; /* hamming */ 1101 chip->ecc.strength = ecc_level; 1103 if (chip->ecc.size == 0) { 1105 chip->ecc.size = 1024; 1107 chip->ecc.size = 512; 1305 .ecc = brcmnand_hamming_ooblayout_ecc, 1321 oobregion->offset = ((section + 1) * sas) - chip->ecc.bytes; 1322 oobregion->length = chip->ecc 1390 struct nand_ecc_ctrl *ecc = &host->chip.ecc; local 2104 struct mtd_oob_region ecc; local [all...] |
/linux-master/drivers/mtd/nand/raw/atmel/ |
H A D | nand-controller.c | 840 for (i = 0; i < chip->ecc.steps; i++) { 843 eccbuf += chip->ecc.bytes; 876 for (i = 0; i < chip->ecc.steps; i++) { 881 chip->ecc.size, 883 chip->ecc.bytes, 885 chip->ecc.strength); 894 databuf += chip->ecc.size; 895 eccbuf += chip->ecc.bytes; 1132 chip->ecc.strength = val; 1137 chip->ecc [all...] |
/linux-master/drivers/spi/ |
H A D | spi-mtk-snfi.c | 81 #include <linux/mtd/nand-ecc-mtk.h> 312 struct mtk_ecc *ecc; member in struct:mtk_snand 323 struct nand_ecc_engine *eng = nand->ecc.engine; 656 .ecc = mtk_snand_ooblayout_ecc, 663 struct nand_ecc_props *conf = &nand->ecc.ctx.conf; 664 struct nand_ecc_props *reqs = &nand->ecc.requirements; 665 struct nand_ecc_props *user = &nand->ecc.user_conf; 682 nand->ecc.ctx.priv = ecc_cfg; 704 parity_bits = mtk_ecc_get_parity_bits(snf->ecc); 707 mtk_ecc_adjust_strength(snf->ecc, [all...] |
H A D | spi-mxic.c | 16 #include <linux/mtd/nand-ecc-mxic.h> 188 } ecc; member in struct:mxic_spi 412 if (mxic->ecc.use_pipelined_conf && desc->info.op_tmpl.data.ecc) { 413 ret = mxic_ecc_process_data_pipelined(mxic->ecc.pipelined_engine, 456 if (mxic->ecc.use_pipelined_conf && desc->info.op_tmpl.data.ecc) { 457 ret = mxic_ecc_process_data_pipelined(mxic->ecc.pipelined_engine, 575 .ecc = true, 644 struct mxic_spi *mxic = nand->ecc [all...] |
/linux-master/drivers/mtd/nand/spi/ |
H A D | ato.c | 60 .ecc = ato25d1ga_ooblayout_ecc,
|
H A D | foresee.c | 48 .ecc = f35sqa002g_ooblayout_ecc,
|
H A D | core.c | 252 .ecc = spinand_noecc_ooblayout_ecc, 262 nand->ecc.ctx.conf.engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE; 263 nand->ecc.ctx.conf.step_size = nand->ecc.requirements.step_size; 264 nand->ecc.ctx.conf.strength = nand->ecc.requirements.strength; 270 nand->ecc.ctx.priv = engine_conf; 282 kfree(nand->ecc.ctx.priv); 300 struct spinand_ondie_ecc_conf *engine_conf = nand->ecc.ctx.priv; 335 struct spinand_ondie_ecc_conf *engine_conf = nand->ecc [all...] |
H A D | xtx.c | 66 .ecc = xt26g0xa_ooblayout_ecc, 119 .ecc = xt26xxxd_ooblayout_ecc,
|
H A D | paragon.c | 94 .ecc = pn26g0xa_ooblayout_ecc,
|
H A D | alliancememory.c | 91 .ecc = am_ooblayout_ecc,
|
/linux-master/include/linux/mtd/ |
H A D | nand.h | 402 * @ecc: NAND ECC object attached to the NAND device 410 * struct_nand_device->memorg and struct_nand_device->ecc.requirements should 420 struct nand_ecc ecc; member in struct:nand_device 631 return &nand->ecc.ctx.conf; 641 return nand->ecc.ctx.nsteps; 651 return nand->ecc.ctx.total / nand->ecc.ctx.nsteps; 662 return &nand->ecc.requirements; 675 nand->ecc.requirements = *reqs; 1010 return nand->ecc [all...] |