/drivers/mtd/nand/raw/ |
D | mtk_ecc.c | 119 static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc, in mtk_ecc_wait_idle() argument 122 struct device *dev = ecc->dev; in mtk_ecc_wait_idle() 126 ret = readl_poll_timeout_atomic(ecc->regs + ECC_IDLE_REG(op), val, in mtk_ecc_wait_idle() 136 struct mtk_ecc *ecc = id; in mtk_ecc_irq() local 139 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]) in mtk_ecc_irq() 142 dec = readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECDONE]); in mtk_ecc_irq() 143 if (dec & ecc->sectors) { in mtk_ecc_irq() 148 readw(ecc->regs + ecc->caps->ecc_regs[ECC_DECIRQ_STA]); in mtk_ecc_irq() 149 ecc->sectors = 0; in mtk_ecc_irq() 150 complete(&ecc->done); in mtk_ecc_irq() [all …]
|
D | nand_base.c | 262 res = chip->ecc.read_oob(chip, first_page + page_offset); in nand_block_bad() 433 status = chip->ecc.write_oob_raw(chip, page & chip->pagemask); in nand_do_write_oob() 435 status = chip->ecc.write_oob(chip, page & chip->pagemask); in nand_do_write_oob() 2535 void *ecc, int ecclen, in nand_check_erased_ecc_chunk() argument 2548 ecc_bitflips = nand_check_erased_buf(ecc, ecclen, bitflips_threshold); in nand_check_erased_ecc_chunk() 2563 memset(ecc, 0xff, ecclen); in nand_check_erased_ecc_chunk() 2671 int eccsize = chip->ecc.size; in nand_read_page_raw_syndrome() 2672 int eccbytes = chip->ecc.bytes; in nand_read_page_raw_syndrome() 2680 for (steps = chip->ecc.steps; steps > 0; steps--) { in nand_read_page_raw_syndrome() 2687 if (chip->ecc.prepad) { in nand_read_page_raw_syndrome() [all …]
|
D | sunxi_nand.c | 593 bool ecc) in sunxi_nfc_randomizer_state() argument 602 if (ecc) { in sunxi_nfc_randomizer_state() 613 bool ecc) in sunxi_nfc_randomizer_config() argument 623 state = sunxi_nfc_randomizer_state(nand, page, ecc); in sunxi_nfc_randomizer_config() 660 bool ecc, int page) in sunxi_nfc_randomizer_write_buf() argument 662 sunxi_nfc_randomizer_config(nand, page, ecc); in sunxi_nfc_randomizer_write_buf() 669 int len, bool ecc, int page) in sunxi_nfc_randomizer_read_buf() argument 671 sunxi_nfc_randomizer_config(nand, page, ecc); in sunxi_nfc_randomizer_read_buf() 680 struct sunxi_nand_hw_ecc *data = nand->ecc.priv; in sunxi_nfc_hw_ecc_enable() 689 if (nand->ecc.size == 512) in sunxi_nfc_hw_ecc_enable() [all …]
|
D | nand_micron.c | 66 struct micron_on_die_ecc ecc; member 127 .ecc = micron_nand_on_die_4_ooblayout_ecc, 140 oobregion->offset = mtd->oobsize - chip->ecc.total; in micron_nand_on_die_8_ooblayout_ecc() 141 oobregion->length = chip->ecc.total; in micron_nand_on_die_8_ooblayout_ecc() 156 oobregion->length = mtd->oobsize - chip->ecc.total - 2; in micron_nand_on_die_8_ooblayout_free() 162 .ecc = micron_nand_on_die_8_ooblayout_ecc, 172 if (micron->ecc.forced) in micron_nand_on_die_ecc_setup() 175 if (micron->ecc.enabled == enable) in micron_nand_on_die_ecc_setup() 183 micron->ecc.enabled = enable; in micron_nand_on_die_ecc_setup() 242 ret = nand_read_page_op(chip, page, 0, micron->ecc.rawbuf, in micron_nand_on_die_ecc_status_4() [all …]
|
D | omap2.c | 887 if (info->nand.ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST && in omap_correct_data() 888 info->nand.ecc.size == 2048) in omap_correct_data() 956 val = ((((info->nand.ecc.size >> 1) - 1) << ECCSIZE1_SHIFT) | in omap_enable_hwecc() 1055 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch() 1075 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch() 1088 nsectors = chip->ecc.steps; in omap_enable_hwecc_bch() 1144 int eccbytes = info->nand.ecc.bytes; in _omap_calculate_ecc_bch() 1286 int eccbytes = info->nand.ecc.bytes; in omap_calculate_ecc_bch_multi() 1317 for (i = 0; i < info->nand.ecc.size; i++) { in erased_sector_bitflips() 1319 if (flip_bits > info->nand.ecc.strength) in erased_sector_bitflips() [all …]
|
D | nand_bch.c | 40 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc() 43 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc() 44 bch_encode(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc() 47 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc() 66 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data() 70 count = bch_decode(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data() 74 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data() 112 unsigned int eccsize = nand->ecc.size; in nand_bch_init() 113 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init() 114 unsigned int eccstrength = nand->ecc.strength; in nand_bch_init() [all …]
|
D | fsmc_nand.c | 172 if (section >= chip->ecc.steps) in fsmc_ecc1_ooblayout_ecc() 186 if (section >= chip->ecc.steps) in fsmc_ecc1_ooblayout_free() 191 if (section < chip->ecc.steps - 1) in fsmc_ecc1_ooblayout_free() 200 .ecc = fsmc_ecc1_ooblayout_ecc, 215 if (section >= chip->ecc.steps) in fsmc_ecc4_ooblayout_ecc() 218 oobregion->length = chip->ecc.bytes; in fsmc_ecc4_ooblayout_ecc() 233 if (section >= chip->ecc.steps) in fsmc_ecc4_ooblayout_free() 238 if (section < chip->ecc.steps - 1) in fsmc_ecc4_ooblayout_free() 247 .ecc = fsmc_ecc4_ooblayout_ecc, 392 u8 *ecc) in fsmc_read_hwecc_ecc4() argument [all …]
|
D | tango_nand.c | 200 u8 *ecc = chip->oob_poi + BBM_SIZE + METADATA_SIZE; in check_erased_page() local 201 const int ecc_size = chip->ecc.bytes; in check_erased_page() 202 const int pkt_size = chip->ecc.size; in check_erased_page() 205 for (i = 0; i < chip->ecc.steps; ++i) { in check_erased_page() 207 res = nand_check_erased_ecc_chunk(buf, pkt_size, ecc, ecc_size, in check_erased_page() 209 chip->ecc.strength); in check_erased_page() 217 ecc += ecc_size; in check_erased_page() 305 chip->ecc.read_oob(chip, page); in tango_read_page() 313 chip->ecc.read_oob_raw(chip, page); in tango_read_page() 405 const int ecc_size = chip->ecc.bytes; in raw_read() [all …]
|
D | mtk_nand.c | 147 struct mtk_ecc *ecc; member 186 return (u8 *)p + i * chip->ecc.size; in data_ptr() 212 return chip->ecc.size + mtk_nand->spare_per_sector; in mtk_data_len() 226 return nfc->buffer + i * mtk_data_len(chip) + chip->ecc.size; in mtk_oob_ptr() 336 if (chip->ecc.size == 512) in mtk_nfc_hw_runtime_config() 342 if (chip->ecc.size == 512) in mtk_nfc_hw_runtime_config() 348 if (chip->ecc.size == 512) in mtk_nfc_hw_runtime_config() 365 if (chip->ecc.size == 1024) in mtk_nfc_hw_runtime_config() 384 nfc->ecc_cfg.strength = chip->ecc.strength; in mtk_nfc_hw_runtime_config() 385 nfc->ecc_cfg.len = chip->ecc.size + mtk_nand->fdm.ecc_size; in mtk_nfc_hw_runtime_config() [all …]
|
D | qcom_nandc.c | 1391 struct nand_ecc_ctrl *ecc = &chip->ecc; in parse_erase_write_errors() local 1395 num_cw = command == NAND_CMD_PAGEPROG ? ecc->steps : 1; in parse_erase_write_errors() 1441 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_command() local 1476 update_rw_regs(host, ecc->steps, true); in qcom_nandc_command() 1591 struct nand_ecc_ctrl *ecc = &chip->ecc; in qcom_nandc_read_cw_raw() local 1603 data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1); in qcom_nandc_read_cw_raw() 1606 if (cw == (ecc->steps - 1)) { in qcom_nandc_read_cw_raw() 1607 data_size2 = ecc->size - data_size1 - in qcom_nandc_read_cw_raw() 1608 ((ecc->steps - 1) * 4); in qcom_nandc_read_cw_raw() 1609 oob_size2 = (ecc->steps * 4) + host->ecc_bytes_hw + in qcom_nandc_read_cw_raw() [all …]
|
D | stm32_fmc2_nand.c | 315 if (chip->ecc.strength == FMC2_ECC_BCH8) { in stm32_fmc2_nfc_setup() 318 } else if (chip->ecc.strength == FMC2_ECC_BCH4) { in stm32_fmc2_nfc_setup() 377 dma_cfg.src_addr += chip->ecc.strength == FMC2_ECC_HAM ? in stm32_fmc2_nfc_select_chip() 388 nfc->dma_ecc_len = chip->ecc.strength == FMC2_ECC_HAM ? in stm32_fmc2_nfc_select_chip() 466 if (chip->ecc.strength != FMC2_ECC_HAM) { in stm32_fmc2_nfc_hwctl() 483 static void stm32_fmc2_nfc_ham_set_ecc(const u32 ecc_sta, u8 *ecc) in stm32_fmc2_nfc_ham_set_ecc() argument 485 ecc[0] = ecc_sta; in stm32_fmc2_nfc_ham_set_ecc() 486 ecc[1] = ecc_sta >> 8; in stm32_fmc2_nfc_ham_set_ecc() 487 ecc[2] = ecc_sta >> 16; in stm32_fmc2_nfc_ham_set_ecc() 491 u8 *ecc) in stm32_fmc2_nfc_ham_calculate() argument [all …]
|
D | lpc32xx_slc.c | 169 .ecc = lpc32xx_ooblayout_ecc, 407 static void lpc32xx_slc_ecc_copy(uint8_t *spare, const uint32_t *ecc, int count) in lpc32xx_slc_ecc_copy() argument 412 uint32_t ce = ecc[i / 3]; in lpc32xx_slc_ecc_copy() 531 for (i = 0; i < chip->ecc.steps; i++) { in lpc32xx_xfer() 534 dma_buf + i * chip->ecc.size, in lpc32xx_xfer() 535 mtd->writesize / chip->ecc.steps, dir); in lpc32xx_xfer() 540 if (i == chip->ecc.steps - 1) in lpc32xx_xfer() 572 host->ecc_buf[chip->ecc.steps - 1] = in lpc32xx_xfer() 615 status = lpc32xx_xfer(mtd, buf, chip->ecc.steps, 1); in lpc32xx_nand_read_page_syndrome() 621 lpc32xx_slc_ecc_copy(tmpecc, (uint32_t *) host->ecc_buf, chip->ecc.steps); in lpc32xx_nand_read_page_syndrome() [all …]
|
D | tegra_nand.c | 182 struct mtd_oob_region ecc; member 204 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_RS * chip->ecc.strength, in tegra_nand_ooblayout_rs_ecc() 211 oobregion->length = round_up(bytes_per_step * chip->ecc.steps, 4); in tegra_nand_ooblayout_rs_ecc() 223 .ecc = tegra_nand_ooblayout_rs_ecc, 231 int bytes_per_step = DIV_ROUND_UP(BITS_PER_STEP_BCH * chip->ecc.strength, in tegra_nand_ooblayout_bch_ecc() 238 oobregion->length = round_up(bytes_per_step * chip->ecc.steps, 4); in tegra_nand_ooblayout_bch_ecc() 244 .ecc = tegra_nand_ooblayout_bch_ecc, 482 if (chip->ecc.algo == NAND_ECC_ALGO_BCH && enable) in tegra_nand_hw_ecc() 707 if (fail_sec_flag ^ GENMASK(chip->ecc.steps - 1, 0)) { in tegra_nand_read_page_hwecc() 723 for_each_set_bit(bit, &fail_sec_flag, chip->ecc.steps) { in tegra_nand_read_page_hwecc() [all …]
|
D | davinci_nand.c | 147 if ((diff >> (12 + 3)) < chip->ecc.size) { in nand_davinci_correct_1bit() 390 int i, eccsize = chip->ecc.size, ret; in nand_davinci_read_page_hwecc_oob_first() 391 int eccbytes = chip->ecc.bytes; in nand_davinci_read_page_hwecc_oob_first() 392 int eccsteps = chip->ecc.steps; in nand_davinci_read_page_hwecc_oob_first() 394 uint8_t *ecc_code = chip->ecc.code_buf; in nand_davinci_read_page_hwecc_oob_first() 408 chip->ecc.total); in nand_davinci_read_page_hwecc_oob_first() 415 chip->ecc.hwctl(chip, NAND_ECC_READ); in nand_davinci_read_page_hwecc_oob_first() 421 stat = chip->ecc.correct(chip, p, &ecc_code[i], NULL); in nand_davinci_read_page_hwecc_oob_first() 423 (chip->ecc.options & NAND_ECC_GENERIC_ERASED_CHECK)) { in nand_davinci_read_page_hwecc_oob_first() 428 chip->ecc.strength); in nand_davinci_read_page_hwecc_oob_first() [all …]
|
D | denali.c | 210 FIELD_PREP(ECC_CORRECTION__VALUE, chip->ecc.strength), in denali_select_target() 212 iowrite32(chip->ecc.size, denali->reg + CFG_DATA_BLOCK_SIZE); in denali_select_target() 213 iowrite32(chip->ecc.size, denali->reg + CFG_LAST_DATA_BLOCK_SIZE); in denali_select_target() 214 iowrite32(chip->ecc.steps, denali->reg + CFG_NUM_DATA_BLOCKS); in denali_select_target() 246 struct nand_ecc_ctrl *ecc = &chip->ecc; in denali_payload_xfer() local 251 for (i = 0; i < ecc->steps; i++) { in denali_payload_xfer() 252 pos = i * (ecc->size + ecc->bytes); in denali_payload_xfer() 253 len = ecc->size; in denali_payload_xfer() 283 struct nand_ecc_ctrl *ecc = &chip->ecc; in denali_oob_xfer() local 296 for (i = 0; i < ecc->steps; i++) { in denali_oob_xfer() [all …]
|
D | meson_nand.c | 276 pagesize = nand->ecc.size; in meson_nfc_cmd_access() 285 pages = len / nand->ecc.size; in meson_nfc_cmd_access() 338 len = nand->ecc.size * (i + 1) + (nand->ecc.bytes + 2) * i; in meson_nfc_oob_ptr() 348 temp = nand->ecc.size + nand->ecc.bytes; in meson_nfc_data_ptr() 360 oob_len = nand->ecc.bytes + 2; in meson_nfc_get_data_oob() 361 for (i = 0; i < nand->ecc.steps; i++) { in meson_nfc_get_data_oob() 364 memcpy(buf, dsrc, nand->ecc.size); in meson_nfc_get_data_oob() 365 buf += nand->ecc.size; in meson_nfc_get_data_oob() 379 oob_len = nand->ecc.bytes + 2; in meson_nfc_set_data_oob() 380 for (i = 0; i < nand->ecc.steps; i++) { in meson_nfc_set_data_oob() [all …]
|
D | tmio_nand.c | 271 unsigned int ecc; in tmio_nand_calculate_ecc() local 275 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 276 ecc_code[1] = ecc; /* 000-255 LP7-0 */ in tmio_nand_calculate_ecc() 277 ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */ in tmio_nand_calculate_ecc() 278 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 279 ecc_code[2] = ecc; /* 000-255 CP5-0,11b */ in tmio_nand_calculate_ecc() 280 ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */ in tmio_nand_calculate_ecc() 281 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 282 ecc_code[3] = ecc; /* 256-511 LP15-8 */ in tmio_nand_calculate_ecc() 283 ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */ in tmio_nand_calculate_ecc() [all …]
|
D | nand_toshiba.c | 40 NAND_OP_8BIT_DATA_IN(chip->ecc.steps, ecc_status, 0), in toshiba_nand_benand_read_eccstatus_op() 62 for (i = 0; i < chip->ecc.steps; i++) { in toshiba_nand_benand_eccstatus() 132 chip->ecc.bytes = 0; in toshiba_nand_benand_init() 133 chip->ecc.size = 512; in toshiba_nand_benand_init() 134 chip->ecc.strength = 8; in toshiba_nand_benand_init() 135 chip->ecc.read_page = toshiba_nand_read_page_benand; in toshiba_nand_benand_init() 136 chip->ecc.read_subpage = toshiba_nand_read_subpage_benand; in toshiba_nand_benand_init() 137 chip->ecc.write_page = nand_write_page_raw; in toshiba_nand_benand_init() 138 chip->ecc.read_page_raw = nand_read_page_raw_notsupp; in toshiba_nand_benand_init() 139 chip->ecc.write_page_raw = nand_write_page_raw_notsupp; in toshiba_nand_benand_init() [all …]
|
/drivers/mtd/nand/raw/ingenic/ |
D | ingenic_ecc.c | 27 int ingenic_ecc_calculate(struct ingenic_ecc *ecc, in ingenic_ecc_calculate() argument 31 return ecc->ops->calculate(ecc, params, buf, ecc_code); in ingenic_ecc_calculate() 47 int ingenic_ecc_correct(struct ingenic_ecc *ecc, in ingenic_ecc_correct() argument 51 return ecc->ops->correct(ecc, params, buf, ecc_code); in ingenic_ecc_correct() 68 struct ingenic_ecc *ecc; in ingenic_ecc_get() local 76 ecc = platform_get_drvdata(pdev); in ingenic_ecc_get() 77 clk_prepare_enable(ecc->clk); in ingenic_ecc_get() 79 return ecc; in ingenic_ecc_get() 94 struct ingenic_ecc *ecc = NULL; in of_ingenic_ecc_get() local 107 ecc = ingenic_ecc_get(np); in of_ingenic_ecc_get() [all …]
|
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 77 if (section || !ecc->total) in qi_lb60_ooblayout_ecc() 80 oobregion->length = ecc->total; in qi_lb60_ooblayout_ecc() 90 struct nand_ecc_ctrl *ecc = &chip->ecc; in qi_lb60_ooblayout_free() local 95 oobregion->length = mtd->oobsize - ecc->total - 12; in qi_lb60_ooblayout_free() 96 oobregion->offset = 12 + ecc->total; in qi_lb60_ooblayout_free() 102 .ecc = qi_lb60_ooblayout_ecc, 110 struct nand_ecc_ctrl *ecc = &chip->ecc; in jz4725b_ooblayout_ecc() local 112 if (section || !ecc->total) in jz4725b_ooblayout_ecc() [all …]
|
D | jz4740_ecc.c | 45 static void jz4740_ecc_reset(struct ingenic_ecc *ecc, bool calc_ecc) in jz4740_ecc_reset() argument 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() 65 static int jz4740_ecc_calculate(struct ingenic_ecc *ecc, in jz4740_ecc_calculate() argument 73 jz4740_ecc_reset(ecc, true); in jz4740_ecc_calculate() 76 status = readl(ecc->base + JZ_REG_NAND_IRQ_STAT); 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() 87 ecc_code[i] = readb(ecc->base + JZ_REG_NAND_PAR0 + i); in jz4740_ecc_calculate() [all …]
|
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,
|
/drivers/dma/ti/ |
D | edma.c | 228 struct edma_cc *ecc; member 309 static inline unsigned int edma_read(struct edma_cc *ecc, int offset) in edma_read() argument 311 return (unsigned int)__raw_readl(ecc->base + offset); in edma_read() 314 static inline void edma_write(struct edma_cc *ecc, int offset, int val) in edma_write() argument 316 __raw_writel(val, ecc->base + offset); in edma_write() 319 static inline void edma_modify(struct edma_cc *ecc, int offset, unsigned and, in edma_modify() argument 322 unsigned val = edma_read(ecc, offset); in edma_modify() 326 edma_write(ecc, offset, val); in edma_modify() 329 static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and) in edma_and() argument 331 unsigned val = edma_read(ecc, offset); in edma_and() [all …]
|
/drivers/mtd/nand/ |
D | ecc.c | 107 if (!nand->ecc.engine->ops->init_ctx) in nand_ecc_init_ctx() 110 return nand->ecc.engine->ops->init_ctx(nand); in nand_ecc_init_ctx() 120 if (nand->ecc.engine->ops->cleanup_ctx) in nand_ecc_cleanup_ctx() 121 nand->ecc.engine->ops->cleanup_ctx(nand); in nand_ecc_cleanup_ctx() 133 if (!nand->ecc.engine->ops->prepare_io_req) in nand_ecc_prepare_io_req() 136 return nand->ecc.engine->ops->prepare_io_req(nand, req); in nand_ecc_prepare_io_req() 148 if (!nand->ecc.engine->ops->finish_io_req) in nand_ecc_finish_io_req() 151 return nand->ecc.engine->ops->finish_io_req(nand, req); in nand_ecc_finish_io_req() 160 unsigned int total_ecc_bytes = nand->ecc.ctx.total; in nand_ooblayout_ecc_sp() 206 .ecc = nand_ooblayout_ecc_sp, [all …]
|
/drivers/mtd/nand/raw/atmel/ |
D | pmecc.c | 226 if (req->ecc.sectorsize == 512) { in atmel_pmecc_create_gf_tables() 260 if (req->ecc.sectorsize == 512) in atmel_pmecc_get_gf_tables() 282 if (req->pagesize <= 0 || req->oobsize <= 0 || req->ecc.bytes <= 0) in atmel_pmecc_prepare_user_req() 285 if (req->ecc.ooboffset >= 0 && in atmel_pmecc_prepare_user_req() 286 req->ecc.ooboffset + req->ecc.bytes > req->oobsize) in atmel_pmecc_prepare_user_req() 289 if (req->ecc.sectorsize == ATMEL_PMECC_SECTOR_SIZE_AUTO) { in atmel_pmecc_prepare_user_req() 290 if (req->ecc.strength != ATMEL_PMECC_MAXIMIZE_ECC_STRENGTH) 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() [all …]
|