aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorAmul Saha <amul.saha@samsung.com>2009-06-16 01:54:01 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-06-16 03:43:33 -0400
commitc90173f0907486fe4010c2a8cef534e2473db43f (patch)
treeda4610a705abc9b6cd8ca4307242da6763a16f4e /drivers/mtd/onenand
parenta2ab0ce09edf20b5228208405dd14bc8790fbdbd (diff)
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@samsung.com> Signed-off-by: Vishak G <vishak.g@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 864327ed7fb3..6e829095ea9d 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -20,6 +20,7 @@
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/moduleparam.h>
23#include <linux/init.h> 24#include <linux/init.h>
24#include <linux/sched.h> 25#include <linux/sched.h>
25#include <linux/delay.h> 26#include <linux/delay.h>
@@ -34,6 +35,14 @@
34/* Default Flex-OneNAND boundary and lock respectively */ 35/* Default Flex-OneNAND boundary and lock respectively */
35static int flex_bdry[MAX_DIES * 2] = { -1, 0, -1, 0 }; 36static int flex_bdry[MAX_DIES * 2] = { -1, 0, -1, 0 };
36 37
38module_param_array(flex_bdry, int, NULL, 0400);
39MODULE_PARM_DESC(flex_bdry, "SLC Boundary information for Flex-OneNAND"
40 "Syntax:flex_bdry=DIE_BDRY,LOCK,..."
41 "DIE_BDRY: SLC boundary of the die"
42 "LOCK: Locking information for SLC boundary"
43 " : 0->Set boundary in unlocked status"
44 " : 1->Set boundary in locked status");
45
37/** 46/**
38 * onenand_oob_128 - oob info for Flex-Onenand with 4KB page 47 * onenand_oob_128 - oob info for Flex-Onenand with 4KB page
39 * For now, we expose only 64 out of 80 ecc bytes 48 * For now, we expose only 64 out of 80 ecc bytes
@@ -3259,25 +3268,6 @@ out:
3259} 3268}
3260 3269
3261/** 3270/**
3262 * flexonenand_setup - capture Flex-OneNAND boundary and lock
3263 * values passed as kernel parameters
3264 * @param s kernel parameter string
3265 */
3266static int flexonenand_setup(char *s)
3267{
3268 int ints[5], i;
3269
3270 s = get_options(s, 5, ints);
3271
3272 for (i = 0; i < ints[0]; i++)
3273 flex_bdry[i] = ints[i + 1];
3274
3275 return 1;
3276}
3277
3278__setup("onenand.bdry=", flexonenand_setup);
3279
3280/**
3281 * onenand_probe - [OneNAND Interface] Probe the OneNAND device 3271 * onenand_probe - [OneNAND Interface] Probe the OneNAND device
3282 * @param mtd MTD device structure 3272 * @param mtd MTD device structure
3283 * 3273 *