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

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 35401f7b9302527adba8ddb40735d064f0ab9f5d..ccacc40e64ee38d7b32250b88e24e78a85750461 100644 (file)
@@ -672,6 +672,9 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
        } else {
                chip->ecc.mode      = NAND_ECC_SOFT;
        }
+
+       if (set->ecc_layout != NULL)
+               chip->ecc.layout = set->ecc_layout;
 }
 
 /* s3c2410_nand_update_chip
index ab278d5f63dd497f5b10456249120ba23a0a8243..01d175b54bcedc604b39b8a71f60cdf7dc3beb43 100644 (file)
@@ -27,6 +27,7 @@ struct s3c2410_nand_set {
        char                    *name;
        int                     *nr_map;
        struct mtd_partition    *partitions;
+       struct nand_ecclayout   *ecc_layout;
 };
 
 struct s3c2410_platform_nand {