aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_ecc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/nand_ecc.c')
-rw-r--r--drivers/mtd/nand/nand_ecc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
index 271b8e735e8f..b7cfe0d37121 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -110,7 +110,7 @@ static const char bitsperbyte[256] = {
110 110
111/* 111/*
112 * addressbits is a lookup table to filter out the bits from the xor-ed 112 * addressbits is a lookup table to filter out the bits from the xor-ed
113 * ecc data that identify the faulty location. 113 * ECC data that identify the faulty location.
114 * this is only used for repairing parity 114 * this is only used for repairing parity
115 * see the comments in nand_correct_data for more details 115 * see the comments in nand_correct_data for more details
116 */ 116 */
@@ -153,7 +153,7 @@ static const char addressbits[256] = {
153 * __nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256/512-byte 153 * __nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256/512-byte
154 * block 154 * block
155 * @buf: input buffer with raw data 155 * @buf: input buffer with raw data
156 * @eccsize: data bytes per ecc step (256 or 512) 156 * @eccsize: data bytes per ECC step (256 or 512)
157 * @code: output buffer with ECC 157 * @code: output buffer with ECC
158 */ 158 */
159void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize, 159void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize,
@@ -348,7 +348,7 @@ void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize,
348 rp17 = (par ^ rp16) & 0xff; 348 rp17 = (par ^ rp16) & 0xff;
349 349
350 /* 350 /*
351 * Finally calculate the ecc bits. 351 * Finally calculate the ECC bits.
352 * Again here it might seem that there are performance optimisations 352 * Again here it might seem that there are performance optimisations
353 * possible, but benchmarks showed that on the system this is developed 353 * possible, but benchmarks showed that on the system this is developed
354 * the code below is the fastest 354 * the code below is the fastest
@@ -436,7 +436,7 @@ EXPORT_SYMBOL(nand_calculate_ecc);
436 * @buf: raw data read from the chip 436 * @buf: raw data read from the chip
437 * @read_ecc: ECC from the chip 437 * @read_ecc: ECC from the chip
438 * @calc_ecc: the ECC calculated from raw data 438 * @calc_ecc: the ECC calculated from raw data
439 * @eccsize: data bytes per ecc step (256 or 512) 439 * @eccsize: data bytes per ECC step (256 or 512)
440 * 440 *
441 * Detect and correct a 1 bit error for eccsize byte block 441 * Detect and correct a 1 bit error for eccsize byte block
442 */ 442 */
@@ -505,7 +505,7 @@ int __nand_correct_data(unsigned char *buf,
505 } 505 }
506 /* count nr of bits; use table lookup, faster than calculating it */ 506 /* count nr of bits; use table lookup, faster than calculating it */
507 if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) 507 if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
508 return 1; /* error in ecc data; no action needed */ 508 return 1; /* error in ECC data; no action needed */
509 509
510 printk(KERN_ERR "uncorrectable error : "); 510 printk(KERN_ERR "uncorrectable error : ");
511 return -1; 511 return -1;