diff options
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 8 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c/nand.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 15397e0f3965..35401f7b9302 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -357,6 +357,14 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, | |||
357 | if (diff0 == 0 && diff1 == 0 && diff2 == 0) | 357 | if (diff0 == 0 && diff1 == 0 && diff2 == 0) |
358 | return 0; /* ECC is ok */ | 358 | return 0; /* ECC is ok */ |
359 | 359 | ||
360 | /* sometimes people do not think about using the ECC, so check | ||
361 | * to see if we have an 0xff,0xff,0xff read ECC and then ignore | ||
362 | * the error, on the assumption that this is an un-eccd page. | ||
363 | */ | ||
364 | if (read_ecc[0] == 0xff && read_ecc[1] == 0xff && read_ecc[2] == 0xff | ||
365 | && info->platform->ignore_unset_ecc) | ||
366 | return 0; | ||
367 | |||
360 | /* Can we correct this ECC (ie, one row and column change). | 368 | /* Can we correct this ECC (ie, one row and column change). |
361 | * Note, this is similar to the 256 error code on smartmedia */ | 369 | * Note, this is similar to the 256 error code on smartmedia */ |
362 | 370 | ||
diff --git a/include/asm-arm/plat-s3c/nand.h b/include/asm-arm/plat-s3c/nand.h index 8816f7f9cee1..ab278d5f63dd 100644 --- a/include/asm-arm/plat-s3c/nand.h +++ b/include/asm-arm/plat-s3c/nand.h | |||
@@ -36,6 +36,8 @@ struct s3c2410_platform_nand { | |||
36 | int twrph0; /* active time for nWE/nOE */ | 36 | int twrph0; /* active time for nWE/nOE */ |
37 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ | 37 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ |
38 | 38 | ||
39 | unsigned int ignore_unset_ecc : 1; | ||
40 | |||
39 | int nr_sets; | 41 | int nr_sets; |
40 | struct s3c2410_nand_set *sets; | 42 | struct s3c2410_nand_set *sets; |
41 | 43 | ||