mtd: s3c2410: propagate nand options from the platform data

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 30 05:59:02 EST 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=74218fedf478323cce831b51507eebd1faf0bf7f
Commit:     74218fedf478323cce831b51507eebd1faf0bf7f
Parent:     b1c6e6db5bb7acad82e1c64914c6a9404dae3ee1
Author:     Ben Dooks <ben at simtec.co.uk>
AuthorDate: Mon Nov 2 18:12:51 2009 +0000
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Nov 30 09:49:28 2009 +0000

    mtd: s3c2410: propagate nand options from the platform data
    
    Update the nand information passed to the core from the platform data to
    setup the initial option value, so that flags such as NAND_SCAN_SILENT_NODEV
    can pass through.
    
    Signed-off-by: Ben Dooks <ben at simtec.co.uk>
    Signed-off-by: Simtec Linux Team <linux at simtec.co.uk>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 arch/arm/plat-s3c/include/plat/nand.h |    2 ++
 drivers/mtd/nand/s3c2410.c            |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h
index 18f9588..afd1673 100644
--- a/arch/arm/plat-s3c/include/plat/nand.h
+++ b/arch/arm/plat-s3c/include/plat/nand.h
@@ -17,6 +17,7 @@
  *			Setting this flag will allow the kernel to
  *			look for it at boot time and also skip the NAND
  *			scan.
+ * @options:		Default value to set into 'struct nand_chip' options.
  * @nr_chips:		Number of chips in this set
  * @nr_partitions:	Number of partitions pointed to by @partitions
  * @name:		Name of set (optional)
@@ -31,6 +32,7 @@ struct s3c2410_nand_set {
 	unsigned int		disable_ecc:1;
 	unsigned int		flash_bbt:1;
 
+	unsigned int		options;
 	int			nr_chips;
 	int			nr_partitions;
 	char			*name;
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 11dc7e6..6e88bd3 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -774,7 +774,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
 	chip->select_chip  = s3c2410_nand_select_chip;
 	chip->chip_delay   = 50;
 	chip->priv	   = nmtd;
-	chip->options	   = 0;
+	chip->options	   = set->options;
 	chip->controller   = &info->controller;
 
 	switch (info->cpu_type) {



More information about the linux-mtd-cvs mailing list