[patch 01/14] mtd: Flex-OneNAND support
Amul Saha
amul.saha at samsung.com
Thu Jun 11 05:23:48 EDT 2009
This patch now adds support for Flex-OneNAND to be used as a module,
it also supports Boundary setting at module insertion time
Signed-off-by: Amul Kumar Saha <amul.saha at samsung.com>
Signed-off-by: Vishak G <vishak.g at samsung.com>
---
onenand_base.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 8d4c9c2..a91133b 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>
@@ -31,6 +32,18 @@
#include <asm/io.h>
+#ifdef MODULE
+static char *flex_bdry_info;
+
+module_param(flex_bdry_info, charp, 0400);
+MODULE_PARM_DESC(flex_bdry_info, "SLC Boundary information for Flex-OneNAND"
+ "Syntax:flex_bdry_info=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");
+#endif
+
/* Default Flex-OneNAND boundary and lock respectively */
static int flex_bdry[MAX_DIES * 2] = { -1, 0, -1, 0 };
@@ -3271,7 +3284,9 @@ static int flexonenand_setup(char *s)
return 1;
}
+#ifndef MODULE
__setup("onenand.bdry=", flexonenand_setup);
+#endif
/**
* onenand_probe - [OneNAND Interface] Probe the OneNAND device
@@ -3456,6 +3471,10 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
if (onenand_probe(mtd))
return -ENXIO;
+#ifdef MODULE
+ flexonenand_setup(flex_bdry_info);
+#endif
+
/* Set Sync. Burst Read after probing */
if (this->mmcontrol) {
printk(KERN_INFO "OneNAND Sync. Burst Read support\n");
More information about the linux-mtd
mailing list