[patch 01/14] mtd: Flex-OneNAND support
Artem Bityutskiy
dedekind at infradead.org
Thu Jun 11 05:35:06 EDT 2009
On Thu, 2009-06-11 at 14:53 +0530, Amul Saha wrote:
> 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
Why you still need this? Module parameters still work if your stuff
is compiled in - you just pass the "onenand.flex_bdry_info=" kernel
parameter.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list