| /linux/drivers/mtd/nand/raw/ |
| A D | mtk_ecc.c | 138 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]) in mtk_ecc_irq() 141 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECDONE]); in mtk_ecc_irq() 147 readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]); in mtk_ecc_irq() 154 enc = readl(ecc->regs + ecc->caps->ecc_regs[ECC_ENCIRQ_STA]) in mtk_ecc_irq() 266 if (!ecc) { in mtk_ecc_get() 274 return ecc; in mtk_ecc_get() 288 return ecc; in of_mtk_ecc_get() 351 readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECDONE]); in mtk_ecc_disable() 411 ecc->regs + ecc->caps->ecc_regs[ECC_ENCPAR00], in mtk_ecc_encode() 501 ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); in mtk_ecc_probe() [all …]
|
| A D | nand_base.c | 3525 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_read_oob_syndrome() 3592 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_write_oob_syndrome() 5463 chip->ecc.total = base->ecc.ctx.total; in rawnand_sw_hamming_init() 5517 chip->ecc.total = base->ecc.ctx.total; in rawnand_sw_bch_init() 5553 struct nand_ecc_ctrl *ecc = &chip->ecc; in nand_set_ecc_on_host_ops() local 5573 if (!ecc->write_subpage && ecc->hwctl && ecc->calculate) in nand_set_ecc_on_host_ops() 5578 if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) && in nand_set_ecc_on_host_ops() 6119 if (ecc->correct || ecc->calculate) { in nand_scan_tail() 6130 ecc->read_oob_raw = ecc->read_oob; in nand_scan_tail() 6132 ecc->write_oob_raw = ecc->write_oob; in nand_scan_tail() [all …]
|
| A D | sunxi_nand.c | 775 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_correct() local 815 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_chunk() local 893 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_extra_oob() local 921 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_chunks_dma() local 1049 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_chunk() local 1086 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_extra_oob() local 1107 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_page() local 1166 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_subpage() local 1222 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_page() local 1706 ecc->bytes = ALIGN(ecc->bytes, 2); in sunxi_nand_hw_ecc_ctrl_init() [all …]
|
| A D | nand_micron.c | 66 struct micron_on_die_ecc ecc; member 172 if (micron->ecc.forced) in micron_nand_on_die_ecc_setup() 183 micron->ecc.enabled = enable; in micron_nand_on_die_ecc_setup() 251 offs = step * chip->ecc.size; in micron_nand_on_die_ecc_status_4() 355 if (chip->ecc.strength == 4) in micron_nand_read_page_on_die_ecc() 519 micron->ecc.forced = true; in micron_nand_init() 520 micron->ecc.enabled = true; in micron_nand_init() 535 if (!micron->ecc.rawbuf) { in micron_nand_init() 549 chip->ecc.size = 512; in micron_nand_init() 569 kfree(micron->ecc.rawbuf); in micron_nand_init() [all …]
|
| A D | fsmc_nand.c | 392 u8 *ecc) in fsmc_read_hwecc_ecc4() argument 411 ecc[0] = ecc_tmp; in fsmc_read_hwecc_ecc4() 412 ecc[1] = ecc_tmp >> 8; in fsmc_read_hwecc_ecc4() 417 ecc[4] = ecc_tmp; in fsmc_read_hwecc_ecc4() 418 ecc[5] = ecc_tmp >> 8; in fsmc_read_hwecc_ecc4() 423 ecc[8] = ecc_tmp; in fsmc_read_hwecc_ecc4() 424 ecc[9] = ecc_tmp >> 8; in fsmc_read_hwecc_ecc4() 440 u8 *ecc) in fsmc_read_hwecc_ecc1() argument 446 ecc[0] = ecc_tmp; in fsmc_read_hwecc_ecc1() 447 ecc[1] = ecc_tmp >> 8; in fsmc_read_hwecc_ecc1() [all …]
|
| A D | rockchip-nand-controller.c | 266 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_select_chip() local 513 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_write_page_raw() local 594 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_write_page_hwecc() local 703 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_read_page_raw() local 757 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_read_page_hwecc() local 972 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_ecc_init() local 979 if (!ecc->size || !ecc->strength || in rk_nfc_ecc_init() 982 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() 1005 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() 1006 ecc->bytes = DIV_ROUND_UP(ecc->strength * fls(8 * chip->ecc.size), 8); in rk_nfc_ecc_init() [all …]
|
| A D | omap2.c | 1361 struct nand_ecc_ctrl *ecc = &info->nand.ecc; in omap_elm_correct_data() local 1512 data += ecc->size; in omap_elm_correct_data() 1902 off += chip->ecc.total; in omap_ooblayout_free() 2080 chip->ecc.bytes = 3; in omap_nand_attach_chip() 2081 chip->ecc.size = 512; in omap_nand_attach_chip() 2097 chip->ecc.size = 512; in omap_nand_attach_chip() 2098 chip->ecc.bytes = 7; in omap_nand_attach_chip() 2117 chip->ecc.size = 512; in omap_nand_attach_chip() 2134 chip->ecc.size = 512; in omap_nand_attach_chip() 2189 chip->ecc.steps = mtd->writesize / chip->ecc.size; in omap_nand_attach_chip() [all …]
|
| A D | mtk_nand.c | 147 struct mtk_ecc *ecc; member 689 chip->ecc.size); in mtk_nfc_format_subpage() 720 chip->ecc.size); in mtk_nfc_format_page() 1269 if (!nand->ecc.size || !nand->ecc.strength) { in mtk_nfc_ecc_init() 1284 nand->ecc.size = 512; in mtk_nfc_ecc_init() 1287 nand->ecc.size = 1024; in mtk_nfc_ecc_init() 1295 free = (nand->ecc.strength * mtk_ecc_get_parity_bits(nfc->ecc) in mtk_nfc_ecc_init() 1315 mtk_ecc_adjust_strength(nfc->ecc, &nand->ecc.strength); in mtk_nfc_ecc_init() 1318 nand->ecc.size, nand->ecc.strength); in mtk_nfc_ecc_init() 1535 if (IS_ERR(nfc->ecc)) in mtk_nfc_probe() [all …]
|
| A D | qcom_nandc.c | 697 struct nand_ecc_ctrl *ecc = &chip->ecc; in nandc_set_read_loc() local 1153 struct nand_ecc_ctrl *ecc = &chip->ecc; in config_nand_cw_read() local 1476 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_erase_write_errors() local 1526 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_command() local 1676 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_cw_raw() local 1763 struct nand_ecc_ctrl *ecc = &chip->ecc; in check_for_erased_page() local 1822 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_read_errors() local 1924 struct nand_ecc_ctrl *ecc = &chip->ecc; in read_page_ecc() local 2004 struct nand_ecc_ctrl *ecc = &chip->ecc; in copy_last_cw() local 2054 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_page_raw() local [all …]
|
| A D | stm32_fmc2_nand.c | 485 ecc[0] = ecc_sta; in stm32_fmc2_nfc_ham_set_ecc() 491 u8 *ecc) in stm32_fmc2_nfc_ham_calculate() argument 572 u8 *ecc) in stm32_fmc2_nfc_bch_calculate() argument 587 ecc[0] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 588 ecc[1] = bchpbr >> 8; in stm32_fmc2_nfc_bch_calculate() 593 ecc[4] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 594 ecc[5] = bchpbr >> 8; in stm32_fmc2_nfc_bch_calculate() 601 ecc[8] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 607 ecc[12] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 1645 struct nand_ecc_ctrl *ecc = &chip->ecc; in stm32_fmc2_nfc_ooblayout_ecc() local [all …]
|
| A D | davinci_nand.c | 392 int i, eccsize = chip->ecc.size, ret; in nand_davinci_read_page_hwecc_oob_first() 393 int eccbytes = chip->ecc.bytes; in nand_davinci_read_page_hwecc_oob_first() 394 int eccsteps = chip->ecc.steps; in nand_davinci_read_page_hwecc_oob_first() 410 chip->ecc.total); in nand_davinci_read_page_hwecc_oob_first() 432 chip->ecc.strength); in nand_davinci_read_page_hwecc_oob_first() 489 .ecc = hwecc4_ooblayout_small_ecc, 592 switch (chip->ecc.engine_type) { in davinci_nand_attach_chip() 634 chip->ecc.bytes = 10; in davinci_nand_attach_chip() 636 chip->ecc.algo = NAND_ECC_ALGO_BCH; in davinci_nand_attach_chip() 663 chip->ecc.bytes = 3; in davinci_nand_attach_chip() [all …]
|
| A D | lpc32xx_slc.c | 168 .ecc = lpc32xx_ooblayout_ecc, 411 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy() 539 if (i == chip->ecc.steps - 1) in lpc32xx_xfer() 637 buf += chip->ecc.size; in lpc32xx_nand_read_page_syndrome() 638 oobecc += chip->ecc.bytes; in lpc32xx_nand_read_page_syndrome() 658 chip->legacy.read_buf(chip, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_read_page_raw_syndrome() 714 chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_write_page_raw_syndrome() 793 chip->ecc.size = 256; in lpc32xx_nand_attach_chip() 794 chip->ecc.strength = 1; in lpc32xx_nand_attach_chip() 796 chip->ecc.prepad = 0; in lpc32xx_nand_attach_chip() [all …]
|
| A D | tegra_nand.c | 182 struct mtd_oob_region ecc; member 731 chip->ecc.strength); in tegra_nand_read_page_hwecc() 882 switch (chip->ecc.algo) { in tegra_nand_select_strength() 925 chip->ecc.size = 512; in tegra_nand_attach_chip() 926 chip->ecc.steps = mtd->writesize / chip->ecc.size; in tegra_nand_attach_chip() 955 if (!chip->ecc.strength) { in tegra_nand_attach_chip() 964 chip->ecc.strength = ret; in tegra_nand_attach_chip() 970 switch (chip->ecc.algo) { in tegra_nand_attach_chip() 988 chip->ecc.strength); in tegra_nand_attach_chip() 1011 chip->ecc.strength); in tegra_nand_attach_chip() [all …]
|
| /linux/drivers/mtd/nand/raw/ingenic/ |
| A D | ingenic_ecc.c | 31 return ecc->ops->calculate(ecc, params, buf, ecc_code); in ingenic_ecc_calculate() 51 return ecc->ops->correct(ecc, params, buf, ecc_code); in ingenic_ecc_correct() 77 return ecc; in ingenic_ecc_get() 108 return ecc; in of_ingenic_ecc_get() 118 put_device(ecc->dev); in ingenic_ecc_release() 126 ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); in ingenic_ecc_probe() 127 if (!ecc) in ingenic_ecc_probe() 131 if (!ecc->ops) in ingenic_ecc_probe() 135 if (IS_ERR(ecc->base)) in ingenic_ecc_probe() 138 ecc->ops->disable(ecc); in ingenic_ecc_probe() [all …]
|
| A D | ingenic_nand_drv.c | 44 struct ingenic_ecc *ecc; member 75 struct nand_ecc_ctrl *ecc = &chip->ecc; in qi_lb60_ooblayout_ecc() local 90 struct nand_ecc_ctrl *ecc = &chip->ecc; in qi_lb60_ooblayout_free() local 110 struct nand_ecc_ctrl *ecc = &chip->ecc; in jz4725b_ooblayout_ecc() local 125 struct nand_ecc_ctrl *ecc = &chip->ecc; in jz4725b_ooblayout_free() local 193 chip->ecc.bytes = fls((1 + 8) * chip->ecc.size) * in ingenic_nand_attach_chip() 199 if (!nfc->ecc) { in ingenic_nand_attach_chip() 211 chip->ecc.strength, chip->ecc.size, chip->ecc.bytes); in ingenic_nand_attach_chip() 227 eccbytes = mtd->writesize / chip->ecc.size * chip->ecc.bytes; in ingenic_nand_attach_chip() 512 if (nfc->ecc) in ingenic_nand_probe() [all …]
|
| A D | jz4740_ecc.c | 50 writel(0, ecc->base + JZ_REG_NAND_IRQ_STAT); in jz4740_ecc_reset() 53 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_reset() 62 writel(reg, ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_reset() 73 jz4740_ecc_reset(ecc, true); in jz4740_ecc_calculate() 82 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_calculate() 84 writel(reg, ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_calculate() 125 jz4740_ecc_reset(ecc, false); in jz4740_ecc_correct() 130 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_correct() 132 writel(reg, ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_correct() 141 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL); in jz4740_ecc_correct() [all …]
|
| A D | ingenic_ecc.h | 29 int ingenic_ecc_calculate(struct ingenic_ecc *ecc, 32 int ingenic_ecc_correct(struct ingenic_ecc *ecc, 36 void ingenic_ecc_release(struct ingenic_ecc *ecc); 39 int ingenic_ecc_calculate(struct ingenic_ecc *ecc, in ingenic_ecc_calculate() argument 46 int ingenic_ecc_correct(struct ingenic_ecc *ecc, in ingenic_ecc_correct() argument 53 void ingenic_ecc_release(struct ingenic_ecc *ecc) in ingenic_ecc_release() argument 64 void (*disable)(struct ingenic_ecc *ecc); 65 int (*calculate)(struct ingenic_ecc *ecc, 68 int (*correct)(struct ingenic_ecc *ecc,
|
| /linux/drivers/dma/ti/ |
| A D | edma.c | 444 struct edma_cc *ecc = echan->ecc; in edma_set_chmap() local 455 struct edma_cc *ecc = echan->ecc; in edma_setup_interrupt() local 600 struct edma_cc *ecc = echan->ecc; in edma_start() local 627 struct edma_cc *ecc = echan->ecc; in edma_stop() local 673 struct edma_cc *ecc = echan->ecc; in edma_trigger_channel() local 686 struct edma_cc *ecc = echan->ecc; in edma_clean_channel() local 705 struct edma_cc *ecc = echan->ecc; in edma_assign_channel_eventq() local 723 struct edma_cc *ecc = echan->ecc; in edma_alloc_channel() local 777 struct edma_cc *ecc = echan->ecc; in edma_execute() local 1595 struct edma_cc *ecc = echan->ecc; in edma_error_handler() local [all …]
|
| /linux/Documentation/devicetree/bindings/edac/ |
| A D | socfpga-eccmgr.txt | 38 l2-ecc@ffd08140 { 44 ocram-ecc@ffd08144 { 147 l2-ecc@ffd06010 { 154 ocram-ecc@ff8c3000 { 201 dma-ecc@ff8c8000 { 208 usb0-ecc@ff8c8800 { 216 qspi-ecc@ff8c8400 { 224 sdmmc-ecc@ff8c2c00 { 321 ocram-ecc@ff8cc000 { 363 dma-ecc@ff8c9000 { [all …]
|
| /linux/drivers/mtd/nand/ |
| A D | ecc.c | 108 if (!nand->ecc.engine || !nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx() 121 if (nand->ecc.engine && nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx() 122 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx() 134 if (!nand->ecc.engine || !nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req() 149 if (!nand->ecc.engine || !nand->ecc.engine->ops->finish_io_req) in nand_ecc_finish_io_req() 207 .ecc = nand_ooblayout_ecc_sp, 248 .ecc = nand_ooblayout_ecc_lp, 322 .ecc = nand_ooblayout_ecc_lp_hamming, 437 nand->ecc.user_conf.step_size = size; in of_get_nand_ecc_user_config() 593 algo = nand->ecc.defaults.algo; in nand_ecc_get_sw_engine() [all …]
|
| A D | ecc-sw-bch.c | 189 conf->step_size = nand->ecc.user_conf.step_size; in nand_ecc_sw_bch_init_ctx() 190 conf->strength = nand->ecc.user_conf.strength; in nand_ecc_sw_bch_init_ctx() 246 nand->ecc.ctx.priv = engine_conf; in nand_ecc_sw_bch_init_ctx() 247 nand->ecc.ctx.nsteps = nsteps; in nand_ecc_sw_bch_init_ctx() 248 nand->ecc.ctx.total = nsteps * code_size; in nand_ecc_sw_bch_init_ctx() 296 int eccsize = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_bch_prepare_io_req() 298 int eccsteps = nand->ecc.ctx.nsteps; in nand_ecc_sw_bch_prepare_io_req() 299 int total = nand->ecc.ctx.total; in nand_ecc_sw_bch_prepare_io_req() 333 int eccsize = nand->ecc.ctx.conf.step_size; in nand_ecc_sw_bch_finish_io_req() 334 int total = nand->ecc.ctx.total; in nand_ecc_sw_bch_finish_io_req() [all …]
|
| /linux/drivers/mtd/nand/raw/atmel/ |
| A D | pmecc.c | 286 req->ecc.ooboffset + req->ecc.bytes > req->oobsize) in atmel_pmecc_prepare_user_req() 294 req->ecc.sectorsize = 1024; in atmel_pmecc_prepare_user_req() 296 req->ecc.sectorsize = 512; in atmel_pmecc_prepare_user_req() 299 if (req->ecc.sectorsize != 512 && req->ecc.sectorsize != 1024) in atmel_pmecc_prepare_user_req() 305 req->ecc.nsectors = req->pagesize / req->ecc.sectorsize; in atmel_pmecc_prepare_user_req() 333 req->ecc.bytes = eccbytes; in atmel_pmecc_prepare_user_req() 336 if (req->ecc.ooboffset < 0) in atmel_pmecc_prepare_user_req() 390 user->eccbytes = req->ecc.bytes / req->ecc.nsectors; in atmel_pmecc_create_user() 405 user->cache.eaddr = req->ecc.ooboffset + req->ecc.bytes - 1; in atmel_pmecc_create_user() 753 int sector, void *ecc) in atmel_pmecc_get_generated_eccbytes() argument [all …]
|
| /linux/Documentation/devicetree/bindings/mtd/ |
| A D | mtk-nand.txt | 36 ecc-engine = <&bch>; 49 - nand-ecc-mode: the NAND ecc mode (check driver for supported modes) 65 E : nand-ecc-strength. 71 Q : nand-ecc-step-size. 127 nand-ecc-mode = "hw"; 128 nand-ecc-strength = <24>; 129 nand-ecc-step-size = <1024>; 160 "mediatek,mt2701-ecc", 161 "mediatek,mt2712-ecc", 162 "mediatek,mt7622-ecc". [all …]
|
| A D | hisi504-nand.txt | 11 - nand-ecc-mode: Support none and hw ecc mode. 17 - nand-ecc-strength: Number of bits to correct per ECC step. 18 - nand-ecc-step-size: Number of data bytes covered by a single ECC step. 22 - nand-ecc-strength = <16>, nand-ecc-step-size = <1024> 34 nand-ecc-mode = "hw"; 35 nand-ecc-strength = <16>; 36 nand-ecc-step-size = <1024>;
|
| /linux/fs/ocfs2/ |
| A D | blockcheck.c | 353 u32 ecc; in ocfs2_block_check_compute() local 364 BUG_ON(ecc > USHRT_MAX); in ocfs2_block_check_compute() 367 bc->bc_ecc = cpu_to_le16((u16)ecc); in ocfs2_block_check_compute() 385 u32 crc, ecc; in ocfs2_block_check_validate() local 445 u32 crc, ecc; in ocfs2_block_check_compute_bhs() local 461 ecc = (u16)ocfs2_hamming_encode(ecc, bhs[i]->b_data, in ocfs2_block_check_compute_bhs() 470 BUG_ON(ecc > USHRT_MAX); in ocfs2_block_check_compute_bhs() 473 bc->bc_ecc = cpu_to_le16((u16)ecc); in ocfs2_block_check_compute_bhs() 492 u32 crc, ecc, fix; in ocfs2_block_check_validate_bhs() local 524 ecc = (u16)ocfs2_hamming_encode(ecc, bhs[i]->b_data, in ocfs2_block_check_validate_bhs() [all …]
|