mtd: OneNAND: Allow setting of boundary information when built as module
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jun 16 03:59:01 EDT 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c90173f0907486fe4010c2a8cef534e2473db43f
Commit: c90173f0907486fe4010c2a8cef534e2473db43f
Parent: a2ab0ce09edf20b5228208405dd14bc8790fbdbd
Author: Amul Saha <amul.saha at samsung.com>
AuthorDate: Tue Jun 16 11:24:01 2009 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Jun 16 08:43:33 2009 +0100
mtd: OneNAND: Allow setting of boundary information when built as module
This patch unifies the flex_bdry setting for module vs. built-in
configuration of OneNAND.
Signed-off-by: Amul Kumar Saha <amul.saha at samsung.com>
Signed-off-by: Vishak G <vishak.g at samsung.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/onenand/onenand_base.c | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 864327e..6e82909 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -20,6 +20,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/delay.h>
@@ -34,6 +35,14 @@
/* Default Flex-OneNAND boundary and lock respectively */
static int flex_bdry[MAX_DIES * 2] = { -1, 0, -1, 0 };
+module_param_array(flex_bdry, int, NULL, 0400);
+MODULE_PARM_DESC(flex_bdry, "SLC Boundary information for Flex-OneNAND"
+ "Syntax:flex_bdry=DIE_BDRY,LOCK,..."
+ "DIE_BDRY: SLC boundary of the die"
+ "LOCK: Locking information for SLC boundary"
+ " : 0->Set boundary in unlocked status"
+ " : 1->Set boundary in locked status");
+
/**
* onenand_oob_128 - oob info for Flex-Onenand with 4KB page
* For now, we expose only 64 out of 80 ecc bytes
@@ -3259,25 +3268,6 @@ out:
}
/**
- * flexonenand_setup - capture Flex-OneNAND boundary and lock
- * values passed as kernel parameters
- * @param s kernel parameter string
- */
-static int flexonenand_setup(char *s)
-{
- int ints[5], i;
-
- s = get_options(s, 5, ints);
-
- for (i = 0; i < ints[0]; i++)
- flex_bdry[i] = ints[i + 1];
-
- return 1;
-}
-
-__setup("onenand.bdry=", flexonenand_setup);
-
-/**
* onenand_probe - [OneNAND Interface] Probe the OneNAND device
* @param mtd MTD device structure
*
More information about the linux-mtd-cvs
mailing list