aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHolger Freyther <zecke@openmoko.org>2008-11-19 17:10:51 +0000
committerLars-Peter Clausen <lars@metafoo.de>2009-12-06 10:16:49 +0100
commit57a23ec79475bb06294532c6d02fa33d7d87323c (patch)
tree0febc70169e1b9cb83bd0698402755bf6a5a98ad /drivers
parent45e4b53d5734c3ca10e95c072736469188370148 (diff)
mtd: s3c2410_nand: Add config option to disable hw ecc at runtime
This patch adds a flag to the s3c2410_nand platform data, which configures whether hardware ecc is used for that chip. Currently hardware ecc is used if it was compiled into the kernel. But if you want to build a kernel which runs on multiple devices you might have a configuration where you have devices which require hw ecc as well as devices which want software ecc. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/s3c2410.c2
1 files changed, 1 insertions, 1 deletions
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;