[U-Boot] [PATCH] NAND CMD: Add bad block skipping for nboot

Scott Wood scottwood at freescale.com
Mon Dec 15 23:10:40 CET 2008


On Thu, Dec 11, 2008 at 01:32:40PM -0500, David.Kondrad at onqlegrand.com wrote:
> 
> This patch adds bad block skipping for nboot command by using
> nand_read_skip_bad function.

Patch is whitespace-mangled.

> 
> The initial read size had to be increased because there seems to be an
> issue with nand_read_skip_bad and read sizes less than erasesize when
> the first block needs to be skipped.

We should fix that.

> Diff based off of latest git as of 8:30 AM EST.

Which git?  New NAND features should be based off of the "next" branch of
u-boot-nand-flash.git.

> +
> +     /* When using nand_read_skip_bad the process fails
> +           with the original size of writesize when a bad block
> +        needs to be skipped.
> +
> +        This points to a bug in nand_read_skip_bad, but since
> +        this is supposed to be a simple fix let's just bump up
> +        the size so that the read doesn't fail with bad blocks.
> +     */

Typical u-boot multiline comment style is:

/*
 * foo
 * bar
 */

> -     /* FIXME: skip bad blocks */
> -     r = nand_read(nand, offset, &cnt, (u_char *) addr);
> +     /* FIXED: Use same read function as nand read command */
> +     r = nand_read_skip_bad(nand, offset, &cnt, (u_char *) addr);

Just remove the FIXME comment.

-Scott


More information about the U-Boot mailing list