| /openbmc/u-boot/drivers/mtd/nand/raw/ |
| H A D | fsmc_nand.c | 261 const u_char *data, u_char *ecc) in fsmc_read_hwecc() argument 280 ecc[0] = (u_char) (ecc_tmp >> 0); in fsmc_read_hwecc() 281 ecc[1] = (u_char) (ecc_tmp >> 8); in fsmc_read_hwecc() 282 ecc[2] = (u_char) (ecc_tmp >> 16); in fsmc_read_hwecc() 283 ecc[3] = (u_char) (ecc_tmp >> 24); in fsmc_read_hwecc() 286 ecc[4] = (u_char) (ecc_tmp >> 0); in fsmc_read_hwecc() 287 ecc[5] = (u_char) (ecc_tmp >> 8); in fsmc_read_hwecc() 288 ecc[6] = (u_char) (ecc_tmp >> 16); in fsmc_read_hwecc() 289 ecc[7] = (u_char) (ecc_tmp >> 24); in fsmc_read_hwecc() 292 ecc[8] = (u_char) (ecc_tmp >> 0); in fsmc_read_hwecc() [all …]
|
| H A D | sunxi_nand.c | 684 static u16 sunxi_nfc_randomizer_state(struct mtd_info *mtd, int page, bool ecc) in sunxi_nfc_randomizer_state() argument 692 if (ecc) { in sunxi_nfc_randomizer_state() 703 int page, bool ecc) in sunxi_nfc_randomizer_config() argument 714 state = sunxi_nfc_randomizer_state(mtd, page, ecc); in sunxi_nfc_randomizer_config() 753 bool ecc, int page) in sunxi_nfc_randomizer_write_buf() argument 755 sunxi_nfc_randomizer_config(mtd, page, ecc); in sunxi_nfc_randomizer_write_buf() 762 int len, bool ecc, int page) in sunxi_nfc_randomizer_read_buf() argument 764 sunxi_nfc_randomizer_config(mtd, page, ecc); in sunxi_nfc_randomizer_read_buf() 774 struct sunxi_nand_hw_ecc *data = nand->ecc.priv; in sunxi_nfc_hw_ecc_enable() 782 if (nand->ecc.size == 512) in sunxi_nfc_hw_ecc_enable() [all …]
|
| H A D | nand_base.c | 1173 void *ecc, int ecclen, in nand_check_erased_ecc_chunk() argument 1186 ecc_bitflips = nand_check_erased_buf(ecc, ecclen, bitflips_threshold); in nand_check_erased_ecc_chunk() 1201 memset(ecc, 0xff, ecclen); in nand_check_erased_ecc_chunk() 1243 int eccsize = chip->ecc.size; in nand_read_page_raw_syndrome() 1244 int eccbytes = chip->ecc.bytes; in nand_read_page_raw_syndrome() 1248 for (steps = chip->ecc.steps; steps > 0; steps--) { in nand_read_page_raw_syndrome() 1252 if (chip->ecc.prepad) { in nand_read_page_raw_syndrome() 1253 chip->read_buf(mtd, oob, chip->ecc.prepad); in nand_read_page_raw_syndrome() 1254 oob += chip->ecc.prepad; in nand_read_page_raw_syndrome() 1260 if (chip->ecc.postpad) { in nand_read_page_raw_syndrome() [all …]
|
| H A D | mxc_nand.c | 390 int eccpitch = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; 398 for (i = 0; i < chip->ecc.steps; i++) { 399 toread = min_t(int, length, chip->ecc.prepad); 405 bufpoi += chip->ecc.bytes; 406 host->col_addr += chip->ecc.bytes; 407 length -= chip->ecc.bytes; 409 toread = min_t(int, length, chip->ecc.postpad); 421 mtd->writesize + chip->ecc.prepad, page); 422 bufpoi = buf + chip->ecc.prepad; 423 length = mtd->oobsize - chip->ecc.prepad; [all …]
|
| H A D | omap_gpmc.c | 327 for (i = 0; i < chip->ecc.bytes; i++) in omap_calculate_ecc() 333 ecc_code[chip->ecc.bytes - 1] = 0x00; in omap_calculate_ecc() 496 struct nand_ecc_ctrl *ecc = &chip->ecc; in omap_correct_data_bch() local 506 for (i = 0; i < ecc->bytes && !ecc_flag; i++) { in omap_correct_data_bch() 515 for (i = 0; i < ecc->bytes && !ecc_flag; i++) { in omap_correct_data_bch() 529 omap_reverse_list(calc_ecc, ecc->bytes - 1); in omap_correct_data_bch() 533 omap_reverse_list(calc_ecc, ecc->bytes); in omap_correct_data_bch() 549 error_max = SECTOR_BYTES + (ecc->bytes - 1); in omap_correct_data_bch() 552 error_max = SECTOR_BYTES + ecc->bytes; in omap_correct_data_bch() 586 int i, eccsize = chip->ecc.size; in omap_read_page_bch() [all …]
|
| H A D | davinci_nand.c | 167 u_int32_t ecc = 0; in nand_davinci_readecc() local 169 ecc = __raw_readl(&(davinci_emif_regs->nandfecc[ in nand_davinci_readecc() 172 return ecc; in nand_davinci_readecc() 235 if ((diff >> (12 + 3)) < this->ecc.size) { in nand_davinci_correct_data() 373 saved_ecc_layout = chip->ecc.layout; in nand_davinci_write_page() 374 chip->ecc.layout = &nand_keystone_rbl_4bit_layout_oobfirst; in nand_davinci_write_page() 375 mtd->oobavail = chip->ecc.layout->oobavail; in nand_davinci_write_page() 381 status = chip->ecc.write_page_raw(mtd, chip, buf, in nand_davinci_write_page() 384 status = chip->ecc.write_page(mtd, chip, buf, in nand_davinci_write_page() 404 chip->ecc.layout = saved_ecc_layout; in nand_davinci_write_page() [all …]
|
| H A D | zynq_nand.c | 565 int i, eccsteps, eccsize = chip->ecc.size; in zynq_nand_write_page_hwecc() 568 u32 *eccpos = chip->ecc.layout->eccpos; in zynq_nand_write_page_hwecc() 573 for (eccsteps = chip->ecc.steps; (eccsteps - 1); eccsteps--) { in zynq_nand_write_page_hwecc() 588 chip->ecc.calculate(mtd, p, &ecc_calc[0]); in zynq_nand_write_page_hwecc() 590 for (i = 0; i < chip->ecc.total; i++) in zynq_nand_write_page_hwecc() 623 int i, eccsize = chip->ecc.size; in zynq_nand_write_page_swecc() 624 int eccbytes = chip->ecc.bytes; in zynq_nand_write_page_swecc() 625 int eccsteps = chip->ecc.steps; in zynq_nand_write_page_swecc() 628 u32 *eccpos = chip->ecc.layout->eccpos; in zynq_nand_write_page_swecc() 632 chip->ecc.calculate(mtd, p, &ecc_calc[i]); in zynq_nand_write_page_swecc() [all …]
|
| H A D | nand_bch.c | 45 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc() 48 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc() 49 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc() 52 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc() 71 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data() 75 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data() 79 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data() 114 struct nand_ecclayout *layout = nand->ecc.layout; in nand_bch_init() 117 unsigned int eccsize = nand->ecc.size; in nand_bch_init() 118 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init() [all …]
|
| H A D | atmel_nand.c | 436 static void pmecc_correct_data(struct mtd_info *mtd, uint8_t *buf, uint8_t *ecc, in pmecc_correct_data() argument 467 err_byte = ecc[tmp]; in pmecc_correct_data() 468 ecc[tmp] ^= (1 << bit_pos); in pmecc_correct_data() 470 pos = tmp + nand_chip->ecc.layout->eccpos[0]; in pmecc_correct_data() 472 pos, bit_pos, err_byte, ecc[tmp]); in pmecc_correct_data() 483 u8 *ecc) in pmecc_correction() argument 494 eccbytes = nand_chip->ecc.bytes; in pmecc_correction() 496 if (ecc[i] != 0xff) in pmecc_correction() 517 pmecc_correct_data(mtd, buf_pos, ecc, i, in pmecc_correction() 532 int eccsize = chip->ecc.size; in atmel_nand_pmecc_read_page() [all …]
|
| H A D | lpc32xx_nand_slc.c | 38 u32 ecc; member 104 #define lpc32xx_dmac_set_ecc() ((u32)&lpc32xx_nand_slc_regs->ecc) 334 static u32 slc_ecc_copy_to_buffer(u8 *spare, const u32 *ecc, int count) in slc_ecc_copy_to_buffer() argument 339 u32 ce = ecc[i / CONFIG_SYS_NAND_ECCBYTES]; in slc_ecc_copy_to_buffer() 420 uint32_t *eccpos = chip->ecc.layout->eccpos; in lpc32xx_read_page_hwecc() 431 lpc32xx_dma_read_buf(mtd, p, chip->ecc.size * chip->ecc.steps); in lpc32xx_read_page_hwecc() 435 for (i = 0; i < chip->ecc.total; i++) in lpc32xx_read_page_hwecc() 438 stat = chip->ecc.correct(mtd, p, &ecc_code[0], &ecc_calc[0]); in lpc32xx_read_page_hwecc() 458 uint32_t *eccpos = chip->ecc.layout->eccpos; in lpc32xx_write_page_hwecc() 468 lpc32xx_dma_write_buf(mtd, p, chip->ecc.size * chip->ecc.steps); in lpc32xx_write_page_hwecc() [all …]
|
| H A D | nand_spl_simple.c | 161 this->ecc.hwctl(mtd, NAND_ECC_READ); in nand_read_page() 163 this->ecc.calculate(mtd, p, &ecc_calc[i]); in nand_read_page() 164 this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); in nand_read_page() 185 if (this->ecc.mode != NAND_ECC_SOFT) in nand_read_page() 186 this->ecc.hwctl(mtd, NAND_ECC_READ); in nand_read_page() 188 this->ecc.calculate(mtd, p, &ecc_calc[i]); in nand_read_page() 204 this->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); in nand_read_page() 223 if (nand_chip.ecc.mode == NAND_ECC_SOFT) { in nand_init() 224 nand_chip.ecc.calculate = nand_calculate_ecc; in nand_init() 225 nand_chip.ecc.correct = nand_correct_data; in nand_init()
|
| H A D | lpc32xx_nand_mlc.c | 109 } ecc[4]; member 265 memcpy(&oob->ecc[i], lpc32xx_nand_mlc_registers->buff, 10); in lpc32xx_read_page_hwecc() 307 memcpy(&oob->ecc[i], lpc32xx_nand_mlc_registers->data, 10); in lpc32xx_read_page_raw() 365 memcpy(&oob->ecc[i], lpc32xx_nand_mlc_registers->buff, 10); in lpc32xx_read_oob() 455 memcpy(lpc32xx_nand_mlc_registers->buff, &oob->ecc[i], 10); in lpc32xx_write_page_raw() 563 lpc32xx_chip.ecc.mode = NAND_ECC_HW; in board_nand_init() 564 lpc32xx_chip.ecc.layout = &lpc32xx_largepage_ecclayout; in board_nand_init() 565 lpc32xx_chip.ecc.size = 512; in board_nand_init() 566 lpc32xx_chip.ecc.bytes = 10; in board_nand_init() 567 lpc32xx_chip.ecc.strength = 4; in board_nand_init() [all …]
|
| H A D | denali.c | 313 int ecc_steps = chip->ecc.steps; in denali_check_erased_page() 314 int ecc_size = chip->ecc.size; in denali_check_erased_page() 315 int ecc_bytes = chip->ecc.bytes; in denali_check_erased_page() 319 chip->ecc.total); in denali_check_erased_page() 330 chip->ecc.strength); in denali_check_erased_page() 363 *uncor_ecc_flags = GENMASK(chip->ecc.steps - 1, 0); in denali_hw_ecc_fixup() 384 unsigned int ecc_size = denali->nand.ecc.size; in denali_sw_ecc_fixup() 638 int ecc_steps = chip->ecc.steps; in denali_oob_xfer() 639 int ecc_size = chip->ecc.size; in denali_oob_xfer() 640 int ecc_bytes = chip->ecc.bytes; in denali_oob_xfer() [all …]
|
| H A D | fsl_ifc_nand.c | 293 int sector_start = bufnum * chip->ecc.steps; in fsl_ifc_run_command() 294 int sector_end = sector_start + chip->ecc.steps - 1; in fsl_ifc_run_command() 389 if (chip->ecc.mode == NAND_ECC_HW) in fsl_ifc_cmdfunc() 710 u8 *ecc = chip->oob_poi; in check_erased_page() local 711 const int ecc_size = chip->ecc.bytes; in check_erased_page() 712 const int pkt_size = chip->ecc.size; in check_erased_page() 716 ecc += 8; in check_erased_page() 718 for (i = 0; i < chip->ecc.steps; i++) { in check_erased_page() 719 res = nand_check_erased_ecc_chunk(buf, pkt_size, ecc, ecc_size, in check_erased_page() 720 NULL, 0, chip->ecc.strength); in check_erased_page() [all …]
|
| H A D | pxa3xx_nand.c | 1255 chip->ecc.read_page_raw(mtd, chip, buf, oob_required, page); in pxa3xx_nand_read_page_hwecc() 1258 NULL, 0, chip->ecc.strength); in pxa3xx_nand_read_page_hwecc() 1340 return chip->ecc.read_page_raw(mtd, chip, chip->buffers->databuf, true, in pxa3xx_nand_read_oob_raw() 1520 struct nand_ecc_ctrl *ecc, in pxa_ecc_init() argument 1529 ecc->mode = NAND_ECC_HW; in pxa_ecc_init() 1530 ecc->size = 512; in pxa_ecc_init() 1531 ecc->strength = 1; in pxa_ecc_init() 1539 ecc->mode = NAND_ECC_HW; in pxa_ecc_init() 1540 ecc->size = 512; in pxa_ecc_init() 1541 ecc->strength = 1; in pxa_ecc_init() [all …]
|
| H A D | vf610_nfc.c | 560 int flips_threshold = nfc->chip.ecc.strength / 2; in vf610_nfc_correct_data() 576 flips = count_written_bits(dat, nfc->chip.ecc.size, flips_threshold); in vf610_nfc_correct_data() 583 memset(dat, 0xff, nfc->chip.ecc.size); in vf610_nfc_correct_data() 591 int eccsize = chip->ecc.size; in vf610_nfc_read_page() 674 chip->ecc.size = PAGE_2K; in vf610_nfc_nand_init() 716 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_nand_init() 717 dev_err(nfc->dev, "ecc size: %d\n", chip->ecc.size); in vf610_nfc_nand_init() 728 mtd->ecclayout = chip->ecc.layout; in vf610_nfc_nand_init() 729 chip->ecc.read_page = vf610_nfc_read_page; in vf610_nfc_nand_init() 730 chip->ecc.write_page = vf610_nfc_write_page; in vf610_nfc_nand_init() [all …]
|
| H A D | tegra_nand.c | 510 struct nand_oobfree *free = chip->ecc.layout->oobfree; in nand_rw_page() 548 chip->ecc.layout->oobavail + TAG_ECC_BYTES); in nand_rw_page() 549 tag_size = chip->ecc.layout->oobavail + TAG_ECC_BYTES; in nand_rw_page() 629 chip->ecc.layout->oobavail); in nand_rw_page() 633 chip->ecc.layout->oobavail); in nand_rw_page() 726 struct nand_oobfree *free = chip->ecc.layout->oobfree; in nand_rw_oob() 807 chip->ecc.layout->oobavail); in nand_rw_oob() 934 nand->ecc.mode = NAND_ECC_HW; in tegra_probe() 935 nand->ecc.layout = &eccoob; in tegra_probe() 941 nand->ecc.read_page = nand_read_page_hwecc; in tegra_probe() [all …]
|
| /openbmc/u-boot/drivers/ddr/marvell/axp/ |
| H A D | ddr3_pbs.c | 60 u32 cur_pup, u32 pbs_pattern_idx, u32 ecc); 62 u32 pbs_pattern_idx, u32 ecc); 64 u32 *pcur_pup, u32 pbs_pattern_idx, u32 ecc); 98 u32 ecc; in ddr3_pbs_tx() local 135 for (ecc = 0; ecc < (dram_info->ecc_ena + 1); ecc++) { in ddr3_pbs_tx() 141 cur_max_pup = (1 - ecc) * in ddr3_pbs_tx() 142 dram_info->num_of_std_pups + ecc; in ddr3_pbs_tx() 144 if (ecc) { in ddr3_pbs_tx() 161 reg |= (dram_info->ecc_ena * ecc << in ddr3_pbs_tx() 165 if (ecc) in ddr3_pbs_tx() [all …]
|
| H A D | ddr3_dqs.c | 67 int ddr3_find_adll_limits(MV_DRAM_INFO *dram_info, u32 cs, u32 ecc, int is_tx); 70 static int ddr3_center_calc(MV_DRAM_INFO *dram_info, u32 cs, u32 ecc, 72 int ddr3_special_pattern_i_search(MV_DRAM_INFO *dram_info, u32 cs, u32 ecc, 74 int ddr3_special_pattern_ii_search(MV_DRAM_INFO *dram_info, u32 cs, u32 ecc, 76 int ddr3_set_dqs_centralization_results(MV_DRAM_INFO *dram_info, u32 cs, u32 ecc, 132 u32 cs, ecc, reg; in ddr3_dqs_centralization_rx() local 155 for (ecc = 0; ecc < (dram_info->ecc_ena + 1); ecc++) { in ddr3_dqs_centralization_rx() 161 ecc << REG_DRAM_TRAINING_2_ECC_MUX_OFFS); in ddr3_dqs_centralization_rx() 164 if (ecc) in ddr3_dqs_centralization_rx() 172 ecc, 0); in ddr3_dqs_centralization_rx() [all …]
|
| H A D | ddr3_read_leveling.c | 45 int ratio_2to1, u32 ecc, 49 int ratio_2to1, u32 ecc, 181 u32 reg, cs, ecc, pup_num, phase, delay, pup; in ddr3_read_leveling_sw() local 205 for (ecc = 0; ecc <= (dram_info->ecc_ena); ecc++) { in ddr3_read_leveling_sw() 210 ecc << REG_DRAM_TRAINING_2_ECC_MUX_OFFS); in ddr3_read_leveling_sw() 213 if (ecc) in ddr3_read_leveling_sw() 246 ecc, in ddr3_read_leveling_sw() 254 ecc, in ddr3_read_leveling_sw() 336 u32 *locked_sum, u32 ecc, int *first_octet_locked, in overrun() argument 344 idx = pup + ecc * ECC_BIT; in overrun() [all …]
|
| /openbmc/u-boot/doc/ |
| H A D | README.mpc83xx.ddrecc | 18 the 'ecc testdw' 'ecc testword' command (see example 'Injecting Multiple-Bit 24 Use cases for DDR 'ecc' command: 29 => ecc captureclear 30 => ecc errdetectclr all 31 => ecc sbecnt 0 39 => ecc injectdatahi 1 43 => ecc testdw 200000 10 47 => ecc status 83 => ecc injectdatahi 1 84 => ecc injectdatalo 1 [all …]
|
| /openbmc/u-boot/board/ge/common/ |
| H A D | vpd_reader.c | 48 size_t data_length, const u8 *ecc, size_t ecc_length) in verify_bch() argument 67 int errors = decode_bch(bch, data, data_length, ecc, NULL, NULL, in verify_bch() 155 u8 *ecc = &data[offset]; in vpd_reader() local 157 if (ecc[ID] != ECC_BLOCK_ID || ecc[LEN] < BLOCK_SIZE || in vpd_reader() 158 ecc[LEN] + offset > size || in vpd_reader() 159 ecc[LEN] - BLOCK_SIZE != size_bits / 8 || ecc[VER] != 1 || in vpd_reader() 160 ecc[TYP] != 1) in vpd_reader() 170 ecc[LEN] - BLOCK_SIZE); in vpd_reader()
|
| /openbmc/u-boot/fs/yaffs2/ |
| H A D | yaffs_tagscompat.c | 36 unsigned ecc = 0; in yaffs_calc_tags_ecc() local 39 tags->ecc = 0; in yaffs_calc_tags_ecc() 45 ecc ^= bit; in yaffs_calc_tags_ecc() 48 tags->ecc = ecc; in yaffs_calc_tags_ecc() 53 unsigned ecc = tags->ecc; in yaffs_check_tags_ecc() local 57 ecc ^= tags->ecc; in yaffs_check_tags_ecc() 59 if (ecc && ecc <= 64) { in yaffs_check_tags_ecc() 63 ecc--; in yaffs_check_tags_ecc() 65 b[ecc / 8] ^= (1 << (ecc & 7)); in yaffs_check_tags_ecc() 71 } else if (ecc) { in yaffs_check_tags_ecc()
|
| H A D | yaffs_packedtags2.c | 119 &pt->ecc); in yaffs_pack_tags2() 168 struct yaffs_ecc_other ecc; in yaffs_unpack_tags2() local 172 &ecc); in yaffs_unpack_tags2() 176 &pt->ecc, &ecc); in yaffs_unpack_tags2()
|
| /openbmc/openbmc/meta-openpower/recipes-bsp/ffs/ |
| H A D | ffs.inc | 12 PACKAGE_BEFORE_PN += "${PN}-ecc ${PN}-deprecated" 14 FILES:${PN}-ecc = "${bindir}/ecc"
|