[MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
authorBen Dooks <ben-mtd@fluff.org>
Tue, 15 Apr 2008 10:36:22 +0000 (11:36 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 22 Apr 2008 20:41:32 +0000 (21:41 +0100)
Add support to disable ECC checking for a given chip
when passed by the board via the platform data.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/s3c2410.c
include/asm-arm/plat-s3c/nand.h

index ccacc40..b34a460 100644 (file)
@@ -675,6 +675,9 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 
        if (set->ecc_layout != NULL)
                chip->ecc.layout = set->ecc_layout;
+
+       if (set->disable_ecc)
+               chip->ecc.mode  = NAND_ECC_NONE;
 }
 
 /* s3c2410_nand_update_chip
index 01d175b..ad6bbe9 100644 (file)
@@ -22,6 +22,8 @@
 */
 
 struct s3c2410_nand_set {
+       unsigned int            disable_ecc : 1;
+
        int                     nr_chips;
        int                     nr_partitions;
        char                    *name;