]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[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 ccacc40e64ee38d7b32250b88e24e78a85750461..b34a460ab67915afe3812d6ced1410cfff6c16b7 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 01d175b54bcedc604b39b8a71f60cdf7dc3beb43..ad6bbe90616e2e026810deabffe71f90fafd2ab5 100644 (file)
@@ -22,6 +22,8 @@
 */
 
 struct s3c2410_nand_set {
+       unsigned int            disable_ecc : 1;
+
        int                     nr_chips;
        int                     nr_partitions;
        char                    *name;