[U-Boot-Users] [PATCH] mtd: CONFIG_NAND_LAZY_SCAN option support
Scott Wood
scottwood at freescale.com
Thu Jun 26 18:52:26 CEST 2008
Ilya Yanok wrote:
> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> index 37eb41b..6f5d13d 100644
> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -236,6 +236,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc,
> char *argv[])
> }
> nand = &nand_info[nand_curr_device];
>
> + nand_lazy_scan_finish(nand);
> +
There are other entry points that need to be covered (e.g. do_nandboot,
do_onenand, env_nand, jffs2, etc). Probably better to put the call in
nand_block_isbad().
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 740d3fc..f3ee705 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2652,8 +2652,13 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
> #if 0
> mtd->owner = THIS_MODULE;
> #endif
> +#ifdef CONFIG_NAND_LAZY_SCAN
> + this->options &= ~NAND_BBT_SCANNED;
> + return 0;
> +#else
> /* Build bad block table */
> return this->scan_bbt (mtd);
> +#endif
Is there any reason not to enable this unconditionally?
Also, this patch is whitespace-mangled.
-Scott
More information about the U-Boot
mailing list