aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 *