/linux-2.6.39/drivers/mtd/nand/ |
D | nand_base.c | 1088 int eccsize = chip->ecc.size; in nand_read_page_raw_syndrome() 1089 int eccbytes = chip->ecc.bytes; in nand_read_page_raw_syndrome() 1093 for (steps = chip->ecc.steps; steps > 0; steps--) { in nand_read_page_raw_syndrome() 1097 if (chip->ecc.prepad) { in nand_read_page_raw_syndrome() 1098 chip->read_buf(mtd, oob, chip->ecc.prepad); in nand_read_page_raw_syndrome() 1099 oob += chip->ecc.prepad; in nand_read_page_raw_syndrome() 1105 if (chip->ecc.postpad) { in nand_read_page_raw_syndrome() 1106 chip->read_buf(mtd, oob, chip->ecc.postpad); in nand_read_page_raw_syndrome() 1107 oob += chip->ecc.postpad; in nand_read_page_raw_syndrome() 1128 int i, eccsize = chip->ecc.size; in nand_read_page_swecc() [all …]
|
D | atmel_nand.c | 98 void __iomem *ecc; member 313 ecc_value = ecc_readl(host->ecc, PR); in atmel_nand_calculate() 319 ecc_value = ecc_readl(host->ecc, NPR) & ATMEL_ECC_NPARITY; in atmel_nand_calculate() 337 int eccsize = chip->ecc.size; in atmel_nand_read_page() 338 int eccbytes = chip->ecc.bytes; in atmel_nand_read_page() 339 uint32_t *eccpos = chip->ecc.layout->eccpos; in atmel_nand_read_page() 355 ecc_writel(host->ecc, CR, ATMEL_ECC_RST); in atmel_nand_read_page() 378 stat = chip->ecc.correct(mtd, p, oob, NULL); in atmel_nand_read_page() 415 ecc_status = ecc_readl(host->ecc, SR); in atmel_nand_correct() 422 ecc_bit = ecc_readl(host->ecc, PR) & ATMEL_ECC_BITADDR; in atmel_nand_correct() [all …]
|
D | rtc_from4.c | 345 uint8_t ecc[8]; in rtc_from4_correct_data() local 357 ecc[i] = bitrev8(*rs_ecc); in rtc_from4_correct_data() 362 …par[5] = rs_decoder->index_of[(((uint16_t) ecc[0] >> 0) & 0x0ff) | (((uint16_t) ecc[1] << 8) & 0x3… in rtc_from4_correct_data() 363 …par[4] = rs_decoder->index_of[(((uint16_t) ecc[1] >> 2) & 0x03f) | (((uint16_t) ecc[2] << 6) & 0x3… in rtc_from4_correct_data() 364 …par[3] = rs_decoder->index_of[(((uint16_t) ecc[2] >> 4) & 0x00f) | (((uint16_t) ecc[3] << 4) & 0x3… in rtc_from4_correct_data() 365 …par[2] = rs_decoder->index_of[(((uint16_t) ecc[3] >> 6) & 0x003) | (((uint16_t) ecc[4] << 2) & 0x3… in rtc_from4_correct_data() 366 …par[1] = rs_decoder->index_of[(((uint16_t) ecc[5] >> 0) & 0x0ff) | (((uint16_t) ecc[6] << 8) & 0x3… in rtc_from4_correct_data() 367 par[0] = (((uint16_t) ecc[6] >> 2) & 0x03f) | (((uint16_t) ecc[7] << 6) & 0x3c0); in rtc_from4_correct_data() 528 this->ecc.mode = NAND_ECC_HW_SYNDROME; in rtc_from4_init() 529 this->ecc.size = 512; in rtc_from4_init() [all …]
|
D | fsmc_nand.c | 342 uint8_t *ecc) in fsmc_read_hwecc_ecc4() argument 359 ecc[0] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4() 360 ecc[1] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc4() 361 ecc[2] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4() 362 ecc[3] = (uint8_t) (ecc_tmp >> 24); in fsmc_read_hwecc_ecc4() 365 ecc[4] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4() 366 ecc[5] = (uint8_t) (ecc_tmp >> 8); in fsmc_read_hwecc_ecc4() 367 ecc[6] = (uint8_t) (ecc_tmp >> 16); in fsmc_read_hwecc_ecc4() 368 ecc[7] = (uint8_t) (ecc_tmp >> 24); in fsmc_read_hwecc_ecc4() 371 ecc[8] = (uint8_t) (ecc_tmp >> 0); in fsmc_read_hwecc_ecc4() [all …]
|
D | s3c2410.c | 548 unsigned long ecc = readl(info->regs + S3C2412_NFMECC0); in s3c2412_nand_calculate_ecc() local 550 ecc_code[0] = ecc; in s3c2412_nand_calculate_ecc() 551 ecc_code[1] = ecc >> 8; in s3c2412_nand_calculate_ecc() 552 ecc_code[2] = ecc >> 16; in s3c2412_nand_calculate_ecc() 562 unsigned long ecc = readl(info->regs + S3C2440_NFMECC0); in s3c2440_nand_calculate_ecc() local 564 ecc_code[0] = ecc; in s3c2440_nand_calculate_ecc() 565 ecc_code[1] = ecc >> 8; in s3c2440_nand_calculate_ecc() 566 ecc_code[2] = ecc >> 16; in s3c2440_nand_calculate_ecc() 568 pr_debug("%s: returning ecc %06lx\n", __func__, ecc & 0xffffff); in s3c2440_nand_calculate_ecc() 817 chip->ecc.calculate = s3c2410_nand_calculate_ecc; in s3c2410_nand_init_chip() [all …]
|
D | bf5xx_nand.c | 314 if (chip->ecc.size == 512) { in bf5xx_nand_correct_data() 350 if (chip->ecc.size == 512) { in bf5xx_nand_calculate_ecc() 484 (unsigned int)(buf + chip->ecc.size)); in bf5xx_nand_dma_rw() 487 (unsigned int)(buf + chip->ecc.size)); in bf5xx_nand_dma_rw() 508 set_dma_x_count(CH_NFC, (chip->ecc.size >> 1)); in bf5xx_nand_dma_rw() 514 set_dma_x_count(CH_NFC, (chip->ecc.size >> 2)); in bf5xx_nand_dma_rw() 540 if (len == chip->ecc.size) in bf5xx_nand_dma_read_buf() 554 if (len == chip->ecc.size) in bf5xx_nand_dma_write_buf() 708 chip->ecc.size = 512; in bf5xx_nand_scan() 709 chip->ecc.bytes = 6; in bf5xx_nand_scan() [all …]
|
D | cs553x_nand.c | 172 uint32_t ecc; in cs_calculate_ecc() local 176 ecc = readl(mmio_base + MM_NAND_STS); in cs_calculate_ecc() 178 ecc_code[1] = ecc >> 8; in cs_calculate_ecc() 179 ecc_code[0] = ecc >> 16; in cs_calculate_ecc() 180 ecc_code[2] = ecc >> 24; in cs_calculate_ecc() 234 this->ecc.mode = NAND_ECC_HW; in cs553x_init_one() 235 this->ecc.size = 256; in cs553x_init_one() 236 this->ecc.bytes = 3; in cs553x_init_one() 237 this->ecc.hwctl = cs_enable_hwecc; in cs553x_init_one() 238 this->ecc.calculate = cs_calculate_ecc; in cs553x_init_one() [all …]
|
D | tmio_nand.c | 287 unsigned int ecc; in tmio_nand_calculate_ecc() local 291 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 292 ecc_code[1] = ecc; /* 000-255 LP7-0 */ in tmio_nand_calculate_ecc() 293 ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */ in tmio_nand_calculate_ecc() 294 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 295 ecc_code[2] = ecc; /* 000-255 CP5-0,11b */ in tmio_nand_calculate_ecc() 296 ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */ in tmio_nand_calculate_ecc() 297 ecc = tmio_ioread16(tmio->fcr + FCR_DATA); in tmio_nand_calculate_ecc() 298 ecc_code[3] = ecc; /* 256-511 LP15-8 */ in tmio_nand_calculate_ecc() 299 ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */ in tmio_nand_calculate_ecc() [all …]
|
D | bcm_umi_nand.c | 349 int ret = chip->ecc.read_page(mtd, chip, readbackbuf, 0); in bcm_umi_nand_verify_buf() 426 this->ecc.mode = NAND_ECC_HW; in bcm_umi_nand_probe() 427 this->ecc.size = 512; in bcm_umi_nand_probe() 428 this->ecc.bytes = NAND_ECC_NUM_BYTES; in bcm_umi_nand_probe() 430 this->ecc.read_page = bcm_umi_bch_read_page_hwecc; in bcm_umi_nand_probe() 431 this->ecc.write_page = bcm_umi_bch_write_page_hwecc; in bcm_umi_nand_probe() 433 this->ecc.correct = nand_correct_data512; in bcm_umi_nand_probe() 434 this->ecc.calculate = bcm_umi_hamming_get_hw_ecc; in bcm_umi_nand_probe() 435 this->ecc.hwctl = bcm_umi_hamming_enable_hwecc; in bcm_umi_nand_probe() 461 this->ecc.layout = &nand_hw_eccoob_4096; in bcm_umi_nand_probe() [all …]
|
D | nand_bch.c | 56 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc() 59 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc() 60 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc() 63 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc() 83 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data() 87 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data() 91 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data()
|
D | ndfc.c | 100 uint32_t ecc; in ndfc_calculate_ecc() local 101 uint8_t *p = (uint8_t *)&ecc; in ndfc_calculate_ecc() 104 ecc = in_be32(ndfc->ndfcbase + NDFC_ECC); in ndfc_calculate_ecc() 176 chip->ecc.correct = nand_correct_data; in ndfc_chip_init() 177 chip->ecc.hwctl = ndfc_enable_hwecc; in ndfc_chip_init() 178 chip->ecc.calculate = ndfc_calculate_ecc; in ndfc_chip_init() 179 chip->ecc.mode = NAND_ECC_HW; in ndfc_chip_init() 180 chip->ecc.size = 256; in ndfc_chip_init() 181 chip->ecc.bytes = 3; in ndfc_chip_init()
|
D | sharpsl.c | 175 this->ecc.mode = NAND_ECC_HW; in sharpsl_nand_probe() 176 this->ecc.size = 256; in sharpsl_nand_probe() 177 this->ecc.bytes = 3; in sharpsl_nand_probe() 179 this->ecc.layout = data->ecc_layout; in sharpsl_nand_probe() 180 this->ecc.hwctl = sharpsl_nand_enable_hwecc; in sharpsl_nand_probe() 181 this->ecc.calculate = sharpsl_nand_calculate_ecc; in sharpsl_nand_probe() 182 this->ecc.correct = nand_correct_data; in sharpsl_nand_probe()
|
D | davinci_nand.c | 204 if ((diff >> (12 + 3)) < chip->ecc.size) { in nand_davinci_correct_1bit() 632 info->chip.ecc.calculate = nand_davinci_calculate_4bit; in nand_davinci_probe() 633 info->chip.ecc.correct = nand_davinci_correct_4bit; in nand_davinci_probe() 634 info->chip.ecc.hwctl = nand_davinci_hwctl_4bit; in nand_davinci_probe() 635 info->chip.ecc.bytes = 10; in nand_davinci_probe() 637 info->chip.ecc.calculate = nand_davinci_calculate_1bit; in nand_davinci_probe() 638 info->chip.ecc.correct = nand_davinci_correct_1bit; in nand_davinci_probe() 639 info->chip.ecc.hwctl = nand_davinci_hwctl_1bit; in nand_davinci_probe() 640 info->chip.ecc.bytes = 3; in nand_davinci_probe() 642 info->chip.ecc.size = 512; in nand_davinci_probe() [all …]
|
D | jz4740_nand.c | 206 t &= dat[nand->chip.ecc.size / 2]; in jz_nand_correct_ecc_rs() 207 t &= dat[nand->chip.ecc.size - 1]; in jz_nand_correct_ecc_rs() 210 for (i = 1; i < nand->chip.ecc.size - 1; ++i) in jz_nand_correct_ecc_rs() 337 chip->ecc.hwctl = jz_nand_hwctl; in jz_nand_probe() 338 chip->ecc.calculate = jz_nand_calculate_ecc_rs; in jz_nand_probe() 339 chip->ecc.correct = jz_nand_correct_ecc_rs; in jz_nand_probe() 340 chip->ecc.mode = NAND_ECC_HW_OOB_FIRST; in jz_nand_probe() 341 chip->ecc.size = 512; in jz_nand_probe() 342 chip->ecc.bytes = 9; in jz_nand_probe() 345 chip->ecc.layout = pdata->ecc_layout; in jz_nand_probe()
|
D | txx9ndfmc.c | 199 for (eccbytes = chip->ecc.bytes; eccbytes > 0; eccbytes -= 3) { in txx9ndfmc_calculate_ecc() 217 for (eccsize = chip->ecc.size; eccsize > 0; eccsize -= 256) { in txx9ndfmc_correct_data() 281 chip->ecc.size = 512; in txx9ndfmc_nand_scan() 282 chip->ecc.bytes = 6; in txx9ndfmc_nand_scan() 365 chip->ecc.calculate = txx9ndfmc_calculate_ecc; in txx9ndfmc_probe() 366 chip->ecc.correct = txx9ndfmc_correct_data; in txx9ndfmc_probe() 367 chip->ecc.hwctl = txx9ndfmc_enable_hwecc; in txx9ndfmc_probe() 368 chip->ecc.mode = NAND_ECC_HW; in txx9ndfmc_probe() 370 chip->ecc.size = 256; in txx9ndfmc_probe() 371 chip->ecc.bytes = 3; in txx9ndfmc_probe()
|
D | nomadik_nand.c | 145 nand->ecc.mode = NAND_ECC_SOFT; in nomadik_nand_probe() 146 nand->ecc.layout = &nomadik_ecc_layout; in nomadik_nand_probe() 147 nand->ecc.hwctl = nomadik_ecc_control; in nomadik_nand_probe() 148 nand->ecc.size = 512; in nomadik_nand_probe() 149 nand->ecc.bytes = 3; in nomadik_nand_probe()
|
D | bcm_umi_bch.c | 113 int eccsize = chip->ecc.size; in bcm_umi_bch_read_page_hwecc() 114 int eccsteps = chip->ecc.steps; in bcm_umi_bch_read_page_hwecc() 197 int eccsize = chip->ecc.size; in bcm_umi_bch_write_page_hwecc() 198 int eccsteps = chip->ecc.steps; in bcm_umi_bch_write_page_hwecc()
|
D | sh_flctl.c | 346 int i, eccsize = chip->ecc.size; in flctl_read_page_hwecc() 347 int eccbytes = chip->ecc.bytes; in flctl_read_page_hwecc() 348 int eccsteps = chip->ecc.steps; in flctl_read_page_hwecc() 368 int i, eccsize = chip->ecc.size; in flctl_write_page_hwecc() 369 int eccbytes = chip->ecc.bytes; in flctl_write_page_hwecc() 370 int eccsteps = chip->ecc.steps; in flctl_write_page_hwecc() 775 chip->ecc.layout = &flctl_4secc_oob_16; in flctl_chip_init_tail() 778 chip->ecc.layout = &flctl_4secc_oob_64; in flctl_chip_init_tail() 782 chip->ecc.size = 512; in flctl_chip_init_tail() 783 chip->ecc.bytes = 10; in flctl_chip_init_tail() [all …]
|
D | cafe_nand.c | 542 chip->ecc.write_page_raw(mtd, chip, buf); in cafe_nand_write_page() 544 chip->ecc.write_page(mtd, chip, buf); in cafe_nand_write_page() 776 cafe->nand.ecc.layout = &cafe_oobinfo_2048; in cafe_nand_probe() 780 cafe->nand.ecc.layout = &cafe_oobinfo_512; in cafe_nand_probe() 788 cafe->nand.ecc.mode = NAND_ECC_HW_SYNDROME; in cafe_nand_probe() 789 cafe->nand.ecc.size = mtd->writesize; in cafe_nand_probe() 790 cafe->nand.ecc.bytes = 14; in cafe_nand_probe() 791 cafe->nand.ecc.hwctl = (void *)cafe_nand_bug; in cafe_nand_probe() 792 cafe->nand.ecc.calculate = (void *)cafe_nand_bug; in cafe_nand_probe() 793 cafe->nand.ecc.correct = (void *)cafe_nand_bug; in cafe_nand_probe() [all …]
|
D | fsl_elbc_nand.c | 690 chip->ecc.mode); in fsl_elbc_chip_init_tail() 692 chip->ecc.steps); in fsl_elbc_chip_init_tail() 694 chip->ecc.bytes); in fsl_elbc_chip_init_tail() 696 chip->ecc.total); in fsl_elbc_chip_init_tail() 698 chip->ecc.layout); in fsl_elbc_chip_init_tail() 718 chip->ecc.size = 512; in fsl_elbc_chip_init_tail() 719 chip->ecc.layout = (priv->fmr & FMR_ECCM) ? in fsl_elbc_chip_init_tail() 800 chip->ecc.read_page = fsl_elbc_read_page; in fsl_elbc_chip_init() 801 chip->ecc.write_page = fsl_elbc_write_page; in fsl_elbc_chip_init() 806 chip->ecc.mode = NAND_ECC_HW; in fsl_elbc_chip_init() [all …]
|
D | denali.c | 1601 denali->nand.ecc.mode = NAND_ECC_HW_SYNDROME; in denali_pci_probe() 1612 denali->nand.ecc.layout = &nand_15bit_oob; in denali_pci_probe() 1613 denali->nand.ecc.bytes = ECC_15BITS; in denali_pci_probe() 1622 denali->nand.ecc.layout = &nand_8bit_oob; in denali_pci_probe() 1623 denali->nand.ecc.bytes = ECC_8BITS; in denali_pci_probe() 1627 denali->nand.ecc.bytes *= denali->devnum; in denali_pci_probe() 1628 denali->nand.ecc.layout->eccbytes *= in denali_pci_probe() 1630 denali->nand.ecc.layout->oobfree[0].offset = in denali_pci_probe() 1631 denali->bbtskipbytes + denali->nand.ecc.layout->eccbytes; in denali_pci_probe() 1632 denali->nand.ecc.layout->oobfree[0].length = in denali_pci_probe() [all …]
|
/linux-2.6.39/fs/ocfs2/ |
D | blockcheck.c | 395 u32 ecc; in ocfs2_block_check_compute() local 400 ecc = ocfs2_hamming_encode_block(data, blocksize); in ocfs2_block_check_compute() 406 BUG_ON(ecc > USHRT_MAX); in ocfs2_block_check_compute() 409 bc->bc_ecc = cpu_to_le16((u16)ecc); in ocfs2_block_check_compute() 426 u32 crc, ecc; in ocfs2_block_check_validate() local 446 ecc = ocfs2_hamming_encode_block(data, blocksize); in ocfs2_block_check_validate() 447 ocfs2_hamming_fix_block(data, blocksize, ecc ^ check.bc_ecc); in ocfs2_block_check_validate() 486 u32 crc, ecc; in ocfs2_block_check_compute_bhs() local 495 for (i = 0, crc = ~0, ecc = 0; i < nr; i++) { in ocfs2_block_check_compute_bhs() 502 ecc = (u16)ocfs2_hamming_encode(ecc, bhs[i]->b_data, in ocfs2_block_check_compute_bhs() [all …]
|
/linux-2.6.39/drivers/staging/keucr/ |
D | smilecc.c | 198 void _Calculate_D_SwECC(buf,ecc) in _Calculate_D_SwECC() argument 200 BYTE *ecc; 202 calculate_ecc(ecctable,buf,ecc+1,ecc+0,ecc+2);
|
/linux-2.6.39/drivers/usb/storage/ |
D | alauda.c | 250 static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) { in nand_compute_ecc() argument 269 ecc[0] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); in nand_compute_ecc() 272 ecc[1] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); in nand_compute_ecc() 274 ecc[2] = ecc2[par]; in nand_compute_ecc() 277 static int nand_compare_ecc(unsigned char *data, unsigned char *ecc) { in nand_compare_ecc() argument 278 return (data[0] == ecc[0] && data[1] == ecc[1] && data[2] == ecc[2]); in nand_compare_ecc() 281 static void nand_store_ecc(unsigned char *data, unsigned char *ecc) { in nand_store_ecc() argument 282 memcpy(data, ecc, 3); in nand_store_ecc() 821 unsigned char ecc[3]; in alauda_write_lba() local 867 nand_compute_ecc(bptr, ecc); in alauda_write_lba() [all …]
|
D | sddr09.c | 222 static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) { in nand_compute_ecc() argument 241 ecc[0] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); in nand_compute_ecc() 244 ecc[1] = ~(a ^ (a<<1) ^ (parity[par] ? 0xaa : 0)); in nand_compute_ecc() 246 ecc[2] = ecc2[par]; in nand_compute_ecc() 249 static int nand_compare_ecc(unsigned char *data, unsigned char *ecc) { in nand_compare_ecc() argument 250 return (data[0] == ecc[0] && data[1] == ecc[1] && data[2] == ecc[2]); in nand_compare_ecc() 253 static void nand_store_ecc(unsigned char *data, unsigned char *ecc) { in nand_store_ecc() argument 254 memcpy(data, ecc, 3); in nand_store_ecc() 876 unsigned char ecc[3]; in sddr09_write_lba() local 917 nand_compute_ecc(bptr, ecc); in sddr09_write_lba() [all …]
|