Selaa lähdekoodia

[MTD] [NAND] S3C2410 Allow ECC layout to be passed through platform data

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>
Ben Dooks 17 vuotta sitten
vanhempi
commit
1c21ab67b7
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 3 0
      drivers/mtd/nand/s3c2410.c
  2. 1 0
      include/asm-arm/plat-s3c/nand.h

+ 3 - 0
drivers/mtd/nand/s3c2410.c

@@ -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

+ 1 - 0
include/asm-arm/plat-s3c/nand.h

@@ -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 {