aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-10-17 03:23:53 +0200
committerLars-Peter Clausen <lars@metafoo.de>2009-10-17 03:23:53 +0200
commit64cbf92a0a2f69ad0cc4543345df765c484f006e (patch)
treef0908de9e74fee3fa59698fc60c542fa152342d9
parent56a284d03b58016325a5bb7e28e35a9621dd57ba (diff)
parentb00a17c6c5a6796117bd67571669cc02ab0c9913 (diff)
Merge branch 'om-s3c-2.6.31' into om-gta02-2.6.31
-rw-r--r--arch/arm/plat-s3c/include/plat/nand.h1
-rw-r--r--drivers/mtd/nand/s3c2410.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h
index 18f958801e6..723ab032059 100644
--- a/arch/arm/plat-s3c/include/plat/nand.h
+++ b/arch/arm/plat-s3c/include/plat/nand.h
@@ -47,6 +47,7 @@ struct s3c2410_platform_nand {
int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */
unsigned int ignore_unset_ecc:1;
+ unsigned int software_ecc:1; /* force software ecc at runtime */
int nr_sets;
struct s3c2410_nand_set *sets;
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 11dc7e69c4f..7dc854c3fd8 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -816,7 +816,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
nmtd->mtd.owner = THIS_MODULE;
nmtd->set = set;
- if (hardware_ecc) {
+ if (!(info->platform && info->platform->software_ecc) && hardware_ecc) {
chip->ecc.calculate = s3c2410_nand_calculate_ecc;
chip->ecc.correct = s3c2410_nand_correct_data;
chip->ecc.mode = NAND_ECC_HW;