Searched refs:ecc (Results 1 - 25 of 155) sorted by relevance

1234567

/linux-master/drivers/mtd/nand/raw/ingenic/
H A Dingenic_ecc.c20 * @ecc: ECC device.
28 int ingenic_ecc_calculate(struct ingenic_ecc *ecc, argument
32 return ecc->ops->calculate(ecc, params, buf, ecc_code);
37 * @ecc: ECC device.
48 int ingenic_ecc_correct(struct ingenic_ecc *ecc, argument
52 return ecc->ops->correct(ecc, params, buf, ecc_code);
69 struct ingenic_ecc *ecc; local
80 ecc
98 struct ingenic_ecc *ecc = NULL; local
121 ingenic_ecc_release(struct ingenic_ecc *ecc) argument
130 struct ingenic_ecc *ecc; local
[all...]
H A Dingenic_ecc.h29 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, argument
46 static inline int ingenic_ecc_correct(struct ingenic_ecc *ecc, argument
53 static inline void ingenic_ecc_release(struct ingenic_ecc *ecc) argument
64 void (*disable)(struct ingenic_ecc *ecc);
65 int (*calculate)(struct ingenic_ecc *ecc,
68 int (*correct)(struct ingenic_ecc *ecc,
H A Djz4740_ecc.c45 static void jz4740_ecc_reset(struct ingenic_ecc *ecc, bool calc_ecc) argument
50 writel(0, ecc->base + JZ_REG_NAND_IRQ_STAT);
53 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL);
62 writel(reg, ecc->base + JZ_REG_NAND_ECC_CTRL);
65 static int jz4740_ecc_calculate(struct ingenic_ecc *ecc, argument
73 jz4740_ecc_reset(ecc, true);
76 status = readl(ecc->base + JZ_REG_NAND_IRQ_STAT);
82 reg = readl(ecc->base + JZ_REG_NAND_ECC_CTRL);
84 writel(reg, ecc->base + JZ_REG_NAND_ECC_CTRL);
87 ecc_code[i] = readb(ecc
117 jz4740_ecc_correct(struct ingenic_ecc *ecc, struct ingenic_ecc_params *params, u8 *buf, u8 *ecc_code) argument
164 jz4740_ecc_disable(struct ingenic_ecc *ecc) argument
[all...]
H A Dingenic_nand_drv.c44 struct ingenic_ecc *ecc; member in struct:ingenic_nfc
75 struct nand_ecc_ctrl *ecc = &chip->ecc; local
77 if (section || !ecc->total)
80 oobregion->length = ecc->total;
90 struct nand_ecc_ctrl *ecc = &chip->ecc; local
95 oobregion->length = mtd->oobsize - ecc->total - 12;
96 oobregion->offset = 12 + ecc->total;
102 .ecc
110 struct nand_ecc_ctrl *ecc = &chip->ecc; local
125 struct nand_ecc_ctrl *ecc = &chip->ecc; local
[all...]
/linux-master/drivers/mtd/nand/
H A Decc-mtk.c18 #include <linux/mtd/nand-ecc-mtk.h>
71 /* ecc strength that each IP supports */
126 static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc, argument
129 struct device *dev = ecc->dev;
133 ret = readl_poll_timeout_atomic(ecc->regs + ECC_IDLE_REG(op), val,
143 struct mtk_ecc *ecc = id; local
146 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA])
149 dec = readw(ecc->regs + ecc
173 mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config) argument
220 mtk_ecc_get_stats(struct mtk_ecc *ecc, struct mtk_ecc_stats *stats, int sectors) argument
248 mtk_ecc_release(struct mtk_ecc *ecc) argument
255 mtk_ecc_hw_init(struct mtk_ecc *ecc) argument
267 struct mtk_ecc *ecc; local
287 struct mtk_ecc *ecc = NULL; local
303 mtk_ecc_enable(struct mtk_ecc *ecc, struct mtk_ecc_config *config) argument
347 mtk_ecc_disable(struct mtk_ecc *ecc) argument
374 mtk_ecc_wait_done(struct mtk_ecc *ecc, enum mtk_ecc_operation op) argument
389 mtk_ecc_encode(struct mtk_ecc *ecc, struct mtk_ecc_config *config, u8 *data, u32 bytes) argument
436 mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p) argument
455 mtk_ecc_get_parity_bits(struct mtk_ecc *ecc) argument
525 struct mtk_ecc *ecc; local
580 struct mtk_ecc *ecc = dev_get_drvdata(dev); local
589 struct mtk_ecc *ecc = dev_get_drvdata(dev); local
[all...]
H A DMakefile5 obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
11 nandcore-$(CONFIG_MTD_NAND_ECC) += ecc.o
12 nandcore-$(CONFIG_MTD_NAND_ECC_SW_HAMMING) += ecc-sw-hamming.o
13 nandcore-$(CONFIG_MTD_NAND_ECC_SW_BCH) += ecc-sw-bch.o
14 nandcore-$(CONFIG_MTD_NAND_ECC_MXIC) += ecc-mxic.o
H A Decc.c41 * - ecc: Correction enabled
56 * - external + prepare + ecc + read: do nothing
57 * - external + finish + ecc + read: calculate expected ECC bytes, extract
60 * - external + prepare + ecc + write: calculate ECC bytes and store them at
63 * - external + finish + ecc + write: do nothing
72 * - pipelined + prepare + ecc + read: enable the controller's ECC engine if
74 * - pipelined + finish + ecc + read: check the status, report any
76 * - pipelined + prepare + ecc + write: enable the controller's ECC engine if
78 * - pipelined + finish + ecc + write: do nothing
87 * - ondie + prepare + ecc
[all...]
H A Decc-sw-bch.c15 #include <linux/mtd/nand-ecc-sw-bch.h>
26 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv;
30 bch_encode(engine_conf->bch, buf, nand->ecc.ctx.conf.step_size, code);
52 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv;
53 unsigned int step_size = nand->ecc.ctx.conf.step_size;
84 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv;
97 * Initialize NAND BCH error correction. @nand.ecc parameters 'step_size' and
110 struct nand_ecc_sw_bch_conf *engine_conf = nand->ecc.ctx.priv;
111 unsigned int eccsize = nand->ecc.ctx.conf.step_size;
172 struct nand_ecc_props *conf = &nand->ecc
[all...]
H A Dcore.c223 engine_type = nand->ecc.user_conf.engine_type;
225 engine_type = nand->ecc.defaults.engine_type;
231 nand->ecc.engine = nand_ecc_get_sw_engine(nand);
234 nand->ecc.engine = nand_ecc_get_on_die_hw_engine(nand);
237 nand->ecc.engine = nand_ecc_get_on_host_hw_engine(nand);
238 if (PTR_ERR(nand->ecc.engine) == -EPROBE_DEFER)
245 if (!nand->ecc.engine)
257 switch (nand->ecc.ctx.conf.engine_type) {
279 if (!nand->ecc.engine)
311 if (!nand->ecc
[all...]
/linux-master/drivers/dma/ti/
H A Dedma.c219 struct edma_cc *ecc; member in struct:edma_chan
300 static inline unsigned int edma_read(struct edma_cc *ecc, int offset) argument
302 return (unsigned int)__raw_readl(ecc->base + offset);
305 static inline void edma_write(struct edma_cc *ecc, int offset, int val) argument
307 __raw_writel(val, ecc->base + offset);
310 static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and, argument
313 unsigned val = edma_read(ecc, offset);
317 edma_write(ecc, offset, val);
320 static inline void edma_or(struct edma_cc *ecc, int offset, unsigned or) argument
322 unsigned val = edma_read(ecc, offse
328 edma_read_array(struct edma_cc *ecc, int offset, int i) argument
334 edma_write_array(struct edma_cc *ecc, int offset, int i, unsigned val) argument
340 edma_modify_array(struct edma_cc *ecc, int offset, int i, unsigned and, unsigned or) argument
346 edma_or_array2(struct edma_cc *ecc, int offset, int i, int j, unsigned or) argument
352 edma_write_array2(struct edma_cc *ecc, int offset, int i, int j, unsigned val) argument
358 edma_shadow0_read_array(struct edma_cc *ecc, int offset, int i) argument
364 edma_shadow0_write(struct edma_cc *ecc, int offset, unsigned val) argument
370 edma_shadow0_write_array(struct edma_cc *ecc, int offset, int i, unsigned val) argument
376 edma_param_modify(struct edma_cc *ecc, int offset, int param_no, unsigned and, unsigned or) argument
382 edma_assign_priority_to_queue(struct edma_cc *ecc, int queue_no, int priority) argument
392 struct edma_cc *ecc = echan->ecc; local
403 struct edma_cc *ecc = echan->ecc; local
419 edma_write_slot(struct edma_cc *ecc, unsigned slot, const struct edmacc_param *param) argument
428 edma_read_slot(struct edma_cc *ecc, unsigned slot, struct edmacc_param *param) argument
454 edma_alloc_slot(struct edma_cc *ecc, int slot) argument
488 edma_free_slot(struct edma_cc *ecc, unsigned slot) argument
506 edma_link(struct edma_cc *ecc, unsigned from, unsigned to) argument
528 edma_get_position(struct edma_cc *ecc, unsigned slot, bool dst) argument
548 struct edma_cc *ecc = echan->ecc; local
575 struct edma_cc *ecc = echan->ecc; local
621 struct edma_cc *ecc = echan->ecc; local
634 struct edma_cc *ecc = echan->ecc; local
653 struct edma_cc *ecc = echan->ecc; local
671 struct edma_cc *ecc = echan->ecc; local
720 struct edma_cc *ecc = echan->ecc; local
1493 struct edma_cc *ecc = data; local
1538 struct edma_cc *ecc = echan->ecc; local
1579 edma_error_pending(struct edma_cc *ecc) argument
1592 struct edma_cc *ecc = data; local
1668 struct edma_cc *ecc = echan->ecc; local
1922 edma_dma_init(struct edma_cc *ecc, bool legacy_mode) argument
2018 edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, struct edma_cc *ecc) argument
2232 struct edma_cc *ecc = ofdma->of_dma_data; local
2292 struct edma_cc *ecc; local
2566 struct edma_cc *ecc = dev_get_drvdata(dev); local
2586 struct edma_cc *ecc = dev_get_drvdata(dev); local
2600 struct edma_cc *ecc = dev_get_drvdata(dev); local
[all...]
/linux-master/drivers/mtd/nand/raw/atmel/
H A Dpmecc.h50 } ecc; member in struct:atmel_pmecc_user_req
65 void *data, void *ecc);
68 int sector, void *ecc);
H A Dpmecc.c226 if (req->ecc.sectorsize == 512) {
260 if (req->ecc.sectorsize == 512)
282 if (req->pagesize <= 0 || req->oobsize <= 0 || req->ecc.bytes <= 0)
285 if (req->ecc.ooboffset >= 0 &&
286 req->ecc.ooboffset + req->ecc.bytes > req->oobsize)
289 if (req->ecc.sectorsize == ATMEL_PMECC_SECTOR_SIZE_AUTO) {
290 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH)
294 req->ecc.sectorsize = 1024;
296 req->ecc
690 atmel_pmecc_correct_sector(struct atmel_pmecc_user *user, int sector, void *data, void *ecc) argument
752 atmel_pmecc_get_generated_eccbytes(struct atmel_pmecc_user *user, int sector, void *ecc) argument
[all...]
/linux-master/drivers/mtd/nand/raw/
H A Dnand_micron.c66 struct micron_on_die_ecc ecc; member in struct:micron_nand
127 .ecc = micron_nand_on_die_4_ooblayout_ecc,
140 oobregion->offset = mtd->oobsize - chip->ecc.total;
141 oobregion->length = chip->ecc.total;
156 oobregion->length = mtd->oobsize - chip->ecc.total - 2;
162 .ecc = micron_nand_on_die_8_ooblayout_ecc,
172 if (micron->ecc.forced)
175 if (micron->ecc.enabled == enable)
183 micron->ecc.enabled = enable;
242 ret = nand_read_page_op(chip, page, 0, micron->ecc
[all...]
H A Dnand_base.c38 #include <linux/mtd/nand-ecc-sw-hamming.h>
39 #include <linux/mtd/nand-ecc-sw-bch.h>
262 res = chip->ecc.read_oob(chip, first_page + page_offset);
479 status = chip->ecc.write_oob_raw(chip, page & chip->pagemask);
481 status = chip->ecc.write_oob(chip, page & chip->pagemask);
2838 * @ecc: ECC buffer
2873 void *ecc, int ecclen,
2886 ecc_bitflips = nand_check_erased_buf(ecc, ecclen, bitflips_threshold);
2901 memset(ecc, 0xff, ecclen);
2926 * nand_read_page_raw - [INTERN] read raw page data without ecc
2872 nand_check_erased_ecc_chunk(void *data, int datalen, void *ecc, int ecclen, void *extraoob, int extraooblen, int bitflips_threshold) argument
5867 struct nand_ecc_ctrl *ecc = &chip->ecc; local
5928 struct nand_ecc_ctrl *ecc = &chip->ecc; local
6304 struct nand_ecc_ctrl *ecc = &chip->ecc; local
[all...]
H A Dfsmc_nand.c29 #include <linux/mtd/nand-ecc-sw-hamming.h>
172 if (section >= chip->ecc.steps)
186 if (section >= chip->ecc.steps)
191 if (section < chip->ecc.steps - 1)
200 .ecc = fsmc_ecc1_ooblayout_ecc,
206 * There are 13 bytes of ecc for every 512 byte block and it has to be read
215 if (section >= chip->ecc.steps)
218 oobregion->length = chip->ecc.bytes;
233 if (section >= chip->ecc.steps)
238 if (section < chip->ecc
391 fsmc_read_hwecc_ecc4(struct nand_chip *chip, const u8 *data, u8 *ecc) argument
439 fsmc_read_hwecc_ecc1(struct nand_chip *chip, const u8 *data, u8 *ecc) argument
[all...]
H A Drockchip-nand-controller.c93 * struct rk_ecc_cnt_status: represent a ecc status data.
197 return (u8 *)p + i * chip->ecc.size;
214 poi = chip->oob_poi + rknand->metadata_size + chip->ecc.bytes * i;
221 return chip->ecc.size + chip->ecc.bytes + NFC_SYS_DATA_SIZE;
235 return nfc->page_buf + i * rk_nfc_data_len(chip) + chip->ecc.size;
265 struct nand_ecc_ctrl *ecc = &chip->ecc; local
299 if (nfc->cur_ecc != ecc->strength)
300 rk_nfc_hw_ecc_setup(chip, ecc
512 struct nand_ecc_ctrl *ecc = &chip->ecc; local
594 struct nand_ecc_ctrl *ecc = &chip->ecc; local
706 struct nand_ecc_ctrl *ecc = &chip->ecc; local
760 struct nand_ecc_ctrl *ecc = &chip->ecc; local
974 struct nand_ecc_ctrl *ecc = &chip->ecc; local
1019 struct nand_ecc_ctrl *ecc = &chip->ecc; local
[all...]
H A Dsunxi_nand.c185 * @ecc: ECC controller structure
195 struct sunxi_nand_hw_ecc ecc; member in struct:sunxi_nand_chip
603 bool ecc)
612 if (ecc) {
623 bool ecc)
633 state = sunxi_nfc_randomizer_state(nand, page, ecc);
670 bool ecc, int page)
672 sunxi_nfc_randomizer_config(nand, page, ecc);
679 int len, bool ecc, int page)
681 sunxi_nfc_randomizer_config(nand, page, ecc);
602 sunxi_nfc_randomizer_state(struct nand_chip *nand, int page, bool ecc) argument
622 sunxi_nfc_randomizer_config(struct nand_chip *nand, int page, bool ecc) argument
668 sunxi_nfc_randomizer_write_buf(struct nand_chip *nand, const uint8_t *buf, int len, bool ecc, int page) argument
678 sunxi_nfc_randomizer_read_buf(struct nand_chip *nand, uint8_t *buf, int len, bool ecc, int page) argument
763 struct nand_ecc_ctrl *ecc = &nand->ecc; local
803 struct nand_ecc_ctrl *ecc = &nand->ecc; local
881 struct nand_ecc_ctrl *ecc = &nand->ecc; local
909 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1037 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1074 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1095 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1154 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1210 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1247 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1281 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1563 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1578 struct nand_ecc_ctrl *ecc = &nand->ecc; local
1617 sunxi_nand_hw_ecc_ctrl_init(struct nand_chip *nand, struct nand_ecc_ctrl *ecc, struct device_node *np) argument
1728 struct nand_ecc_ctrl *ecc = &nand->ecc; local
[all...]
H A Dmtk_nand.c19 #include <linux/mtd/nand-ecc-mtk.h>
146 struct mtk_ecc *ecc; member in struct:mtk_nfc
185 return (u8 *)p + i * chip->ecc.size;
211 return chip->ecc.size + mtk_nand->spare_per_sector;
225 return nfc->buffer + i * mtk_data_len(chip) + chip->ecc.size;
335 if (chip->ecc.size == 512)
341 if (chip->ecc.size == 512)
347 if (chip->ecc.size == 512)
364 if (chip->ecc.size == 1024)
383 nfc->ecc_cfg.strength = chip->ecc
[all...]
H A Dnand_jedec.c30 struct jedec_ecc_info *ecc; local
123 ecc = &p->ecc_info[0];
125 if (ecc->codeword_size >= 9) {
127 .strength = ecc->ecc_bits,
128 .step_size = 1 << ecc->codeword_size,
H A Dnand_toshiba.c40 NAND_OP_8BIT_DATA_IN(chip->ecc.steps, ecc_status, 0),
62 for (i = 0; i < chip->ecc.steps; i++) {
130 * This is why chip->ecc.bytes = 0.
132 chip->ecc.bytes = 0;
133 chip->ecc.size = 512;
134 chip->ecc.strength = 8;
135 chip->ecc.read_page = toshiba_nand_read_page_benand;
136 chip->ecc.read_subpage = toshiba_nand_read_subpage_benand;
137 chip->ecc.write_page = nand_write_page_raw;
138 chip->ecc
[all...]
H A Domap2.c18 #include <linux/mtd/nand-ecc-sw-bch.h>
122 /* GPMC ecc engine settings for read */
129 /* GPMC ecc engine settings for write */
624 * @ecc_buf: buffer to store ecc code
644 * @ecc_data1: ecc code from nand spare area
645 * @ecc_data2: ecc code from hardware register obtained from hardware ecc
774 * @read_ecc: ecc read from nand flash
775 * @calc_ecc: ecc read from HW ECC registers
777 * Compares the ecc rea
1217 struct nand_ecc_ctrl *ecc = &info->nand.ecc; local
[all...]
H A Dndfc.c91 uint32_t ecc; local
92 uint8_t *p = (uint8_t *)&ecc;
95 ecc = in_be32(ndfc->ndfcbase + NDFC_ECC);
149 chip->ecc.correct = rawnand_sw_hamming_correct;
150 chip->ecc.hwctl = ndfc_enable_hwecc;
151 chip->ecc.calculate = ndfc_calculate_ecc;
152 chip->ecc.engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
153 chip->ecc.size = 256;
154 chip->ecc.bytes = 3;
155 chip->ecc
[all...]
/linux-master/fs/ocfs2/
H A Dblockcheck.c338 * ocfs2_block_check structure describing the crc32 and the ecc.
353 u32 ecc; local
358 ecc = ocfs2_hamming_encode_block(data, blocksize);
361 * No ecc'd ocfs2 structure is larger than 4K, so ecc will be no
364 BUG_ON(ecc > USHRT_MAX);
367 bc->bc_ecc = cpu_to_le16((u16)ecc);
385 u32 crc, ecc; local
405 ecc = ocfs2_hamming_encode_block(data, blocksize);
406 ocfs2_hamming_fix_block(data, blocksize, ecc
445 u32 crc, ecc; local
492 u32 crc, ecc, fix; local
[all...]
/linux-master/include/linux/mtd/
H A Dnand-ecc-mtk.h41 void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
42 unsigned int mtk_ecc_get_parity_bits(struct mtk_ecc *ecc);
/linux-master/arch/mips/dec/
H A DMakefile6 obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \

Completed in 233 milliseconds

1234567