From patchwork Tue Jun 16 05:54:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/14] mtd: Flex-OneNAND support Date: Mon, 15 Jun 2009 19:54:01 -0000 From: Amul Saha X-Patchwork-Id: 28720 Message-Id: <7C45F67946474303B9071EA1CF2F8807@sisodomain.com> To: David Woodhouse Cc: kyungmin.park@samsung.com, vishak.g@samsung.com, linux-mtd@lists.infradead.org, apgmoorthy , akpm@linux-foundation.org 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 Signed-off-by: Vishak G --- onenand_base.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 8d4c9c2..5efb25b 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -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 @@ -3255,25 +3264,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 *