| /linux/drivers/mtd/nand/ |
| A D | ecc-mtk.c | 146 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]) in mtk_ecc_irq() 149 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECDONE]); in mtk_ecc_irq() 155 readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]); in mtk_ecc_irq() 162 enc = readl(ecc->regs + ecc->caps->ecc_regs[ECC_ENCIRQ_STA]) in mtk_ecc_irq() 274 if (!ecc) { in mtk_ecc_get() 282 return ecc; in mtk_ecc_get() 299 return ecc; in of_mtk_ecc_get() 362 readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECDONE]); in mtk_ecc_disable() 422 ecc->regs + ecc->caps->ecc_regs[ECC_ENCPAR00], in mtk_ecc_encode() 529 ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); in mtk_ecc_probe() [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 …]
|
| A D | ecc.c | 114 if (!nand->ecc.engine || !nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx() 127 if (nand->ecc.engine && nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx() 140 if (!nand->ecc.engine || !nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req() 155 if (!nand->ecc.engine || !nand->ecc.engine->ops->finish_io_req) in nand_ecc_finish_io_req() 213 .ecc = nand_ooblayout_ecc_sp, 254 .ecc = nand_ooblayout_ecc_lp, 328 .ecc = nand_ooblayout_ecc_lp_hamming, 443 nand->ecc.user_conf.step_size = size; in of_get_nand_ecc_user_config() 599 algo = nand->ecc.defaults.algo; in nand_ecc_get_sw_engine() 616 return nand->ecc.ondie_engine; in nand_ecc_get_on_die_hw_engine() [all …]
|
| /linux/drivers/mtd/nand/raw/ingenic/ |
| A D | ingenic_ecc.c | 32 return ecc->ops->calculate(ecc, params, buf, ecc_code); in ingenic_ecc_calculate() 52 return ecc->ops->correct(ecc, params, buf, ecc_code); in ingenic_ecc_correct() 83 return ecc; in ingenic_ecc_get() 114 return ecc; in of_ingenic_ecc_get() 124 put_device(ecc->dev); in ingenic_ecc_release() 132 ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); in ingenic_ecc_probe() 133 if (!ecc) in ingenic_ecc_probe() 137 if (!ecc->ops) in ingenic_ecc_probe() 141 if (IS_ERR(ecc->base)) in ingenic_ecc_probe() 144 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() 503 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 static inline int ingenic_ecc_calculate(struct ingenic_ecc *ecc, in ingenic_ecc_calculate() argument 46 static inline int ingenic_ecc_correct(struct ingenic_ecc *ecc, in ingenic_ecc_correct() argument 53 static inline 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 | 392 struct edma_cc *ecc = echan->ecc; in edma_set_chmap() local 403 struct edma_cc *ecc = echan->ecc; in edma_setup_interrupt() local 548 struct edma_cc *ecc = echan->ecc; in edma_start() local 575 struct edma_cc *ecc = echan->ecc; in edma_stop() local 621 struct edma_cc *ecc = echan->ecc; in edma_trigger_channel() local 634 struct edma_cc *ecc = echan->ecc; in edma_clean_channel() local 653 struct edma_cc *ecc = echan->ecc; in edma_assign_channel_eventq() local 671 struct edma_cc *ecc = echan->ecc; in edma_alloc_channel() local 720 struct edma_cc *ecc = echan->ecc; in edma_execute() local 1538 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/raw/ |
| 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 | nand_base.c | 3777 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_read_oob_syndrome() 3844 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_write_oob_syndrome() 5784 chip->ecc.total = base->ecc.ctx.total; in rawnand_sw_hamming_init() 5838 chip->ecc.total = base->ecc.ctx.total; in rawnand_sw_bch_init() 5894 if (!ecc->write_subpage && ecc->hwctl && ecc->calculate) in nand_set_ecc_on_host_ops() 5899 if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) && in nand_set_ecc_on_host_ops() 6441 if (ecc->correct || ecc->calculate) { in nand_scan_tail() 6452 ecc->read_oob_raw = ecc->read_oob; in nand_scan_tail() 6454 ecc->write_oob_raw = ecc->write_oob; in nand_scan_tail() 6471 base->ecc.ctx.nsteps = ecc->steps; in nand_scan_tail() [all …]
|
| A D | sunxi_nand.c | 763 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_correct() local 803 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_chunk() local 881 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_extra_oob() local 909 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_chunks_dma() local 1037 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_chunk() local 1074 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_extra_oob() local 1095 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_page() local 1154 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_read_subpage() local 1210 struct nand_ecc_ctrl *ecc = &nand->ecc; in sunxi_nfc_hw_ecc_write_page() local 1688 ecc->bytes = ALIGN(ecc->bytes, 2); in sunxi_nand_hw_ecc_ctrl_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 | 265 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_select_chip() local 512 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 706 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_read_page_raw() local 760 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_read_page_hwecc() local 974 struct nand_ecc_ctrl *ecc = &chip->ecc; in rk_nfc_ecc_init() local 981 if (!ecc->size || !ecc->strength || in rk_nfc_ecc_init() 984 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() 1007 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() 1008 ecc->bytes = DIV_ROUND_UP(ecc->strength * fls(8 * chip->ecc.size), 8); in rk_nfc_ecc_init() [all …]
|
| A D | omap2.c | 1217 struct nand_ecc_ctrl *ecc = &info->nand.ecc; in omap_elm_correct_data() local 1368 data += ecc->size; in omap_elm_correct_data() 1758 off += chip->ecc.total; in omap_ooblayout_free() 1936 chip->ecc.bytes = 3; in omap_nand_attach_chip() 1937 chip->ecc.size = 512; in omap_nand_attach_chip() 1953 chip->ecc.size = 512; in omap_nand_attach_chip() 1954 chip->ecc.bytes = 7; in omap_nand_attach_chip() 1973 chip->ecc.size = 512; in omap_nand_attach_chip() 1990 chip->ecc.size = 512; in omap_nand_attach_chip() 2045 chip->ecc.steps = mtd->writesize / chip->ecc.size; in omap_nand_attach_chip() [all …]
|
| A D | mtk_nand.c | 146 struct mtk_ecc *ecc; member 688 chip->ecc.size); in mtk_nfc_format_subpage() 719 chip->ecc.size); in mtk_nfc_format_page() 1242 if (!nand->ecc.size || !nand->ecc.strength) { in mtk_nfc_ecc_init() 1257 nand->ecc.size = 512; in mtk_nfc_ecc_init() 1260 nand->ecc.size = 1024; in mtk_nfc_ecc_init() 1268 free = (nand->ecc.strength * mtk_ecc_get_parity_bits(nfc->ecc) in mtk_nfc_ecc_init() 1288 mtk_ecc_adjust_strength(nfc->ecc, &nand->ecc.strength); in mtk_nfc_ecc_init() 1291 nand->ecc.size, nand->ecc.strength); in mtk_nfc_ecc_init() 1524 if (IS_ERR(nfc->ecc)) in mtk_nfc_probe() [all …]
|
| A D | qcom_nandc.c | 775 struct nand_ecc_ctrl *ecc = &chip->ecc; in nandc_set_read_loc() local 1240 struct nand_ecc_ctrl *ecc = &chip->ecc; in config_nand_cw_read() local 1468 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_cw_raw() local 1557 struct nand_ecc_ctrl *ecc = &chip->ecc; in check_for_erased_page() local 1616 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_read_errors() local 1718 struct nand_ecc_ctrl *ecc = &chip->ecc; in read_page_ecc() local 1796 struct nand_ecc_ctrl *ecc = &chip->ecc; in copy_last_cw() local 1890 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_page() local 1918 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_page_raw() local 1943 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_oob() local [all …]
|
| A D | lpc32xx_slc.c | 167 .ecc = lpc32xx_ooblayout_ecc, 410 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy() 538 if (i == chip->ecc.steps - 1) in lpc32xx_xfer() 636 buf += chip->ecc.size; in lpc32xx_nand_read_page_syndrome() 637 oobecc += chip->ecc.bytes; in lpc32xx_nand_read_page_syndrome() 657 chip->legacy.read_buf(chip, buf, chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_read_page_raw_syndrome() 713 chip->ecc.size * chip->ecc.steps); in lpc32xx_nand_write_page_raw_syndrome() 794 chip->ecc.size = 256; in lpc32xx_nand_attach_chip() 795 chip->ecc.strength = 1; in lpc32xx_nand_attach_chip() 797 chip->ecc.prepad = 0; in lpc32xx_nand_attach_chip() [all …]
|
| A D | stm32_fmc2_nand.c | 504 ecc[0] = ecc_sta; in stm32_fmc2_nfc_ham_set_ecc() 510 u8 *ecc) in stm32_fmc2_nfc_ham_calculate() argument 591 u8 *ecc) in stm32_fmc2_nfc_bch_calculate() argument 606 ecc[0] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 607 ecc[1] = bchpbr >> 8; in stm32_fmc2_nfc_bch_calculate() 612 ecc[4] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 613 ecc[5] = bchpbr >> 8; in stm32_fmc2_nfc_bch_calculate() 620 ecc[8] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 626 ecc[12] = bchpbr; in stm32_fmc2_nfc_bch_calculate() 1680 struct nand_ecc_ctrl *ecc = &chip->ecc; in stm32_fmc2_nfc_ooblayout_ecc() local [all …]
|
| A D | tegra_nand.c | 185 struct mtd_oob_region ecc; member 734 chip->ecc.strength); in tegra_nand_read_page_hwecc() 885 switch (chip->ecc.algo) { in tegra_nand_select_strength() 928 chip->ecc.size = 512; in tegra_nand_attach_chip() 929 chip->ecc.steps = mtd->writesize / chip->ecc.size; in tegra_nand_attach_chip() 958 if (!chip->ecc.strength) { in tegra_nand_attach_chip() 967 chip->ecc.strength = ret; in tegra_nand_attach_chip() 973 switch (chip->ecc.algo) { in tegra_nand_attach_chip() 991 chip->ecc.strength); in tegra_nand_attach_chip() 1014 chip->ecc.strength); in tegra_nand_attach_chip() [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 | mediatek,mtk-nfc.yaml | 37 ecc-engine: 48 nand-ecc-mode: 63 nand-ecc-step-size: 65 nand-ecc-strength: 78 nand-ecc-step-size: 80 nand-ecc-strength: 93 nand-ecc-step-size: 95 nand-ecc-strength: 104 - ecc-engine 125 ecc-engine = <&bch>; [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>;
|
| A D | mxicy,nand-ecc-engine.yaml | 4 $id: http://devicetree.org/schemas/mtd/mxicy,nand-ecc-engine.yaml# 14 const: mxicy,nand-ecc-engine-rev3 46 nand-ecc-engine = <&ecc_engine0>; 50 ecc_engine0: ecc@43c40000 { 51 compatible = "mxicy,nand-ecc-engine-rev3"; 65 nand-ecc-engine = <&ecc_engine1>; 70 nand-ecc-engine = <&spi_controller1>; 74 ecc_engine1: ecc@43c40000 { 75 compatible = "mxicy,nand-ecc-engine-rev3";
|
| /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 …]
|