public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] NAND bad block Query
Date: Wed, 12 Feb 2014 15:47:55 -0600	[thread overview]
Message-ID: <1392241675.6733.447.camel@snotra.buserror.net> (raw)
In-Reply-To: <52FBE1CD.4040009@gmail.com>

On Wed, 2014-02-12 at 21:04 +0000, Gray Remlin wrote:
> Example taken from include/configs/sheevaplug.h
> 
> #ifdef CONFIG_CMD_NAND
> #define CONFIG_ENV_IS_IN_NAND           1
> #define CONFIG_ENV_SECT_SIZE            0x20000 /* 128K */
> #else
> #define CONFIG_ENV_IS_NOWHERE           1       /* if env in SDRAM */
> #endif
> /*
>  * max 4k env size is enough, but in case of nand
>  * it has to be rounded to sector size
>  */
> #define CONFIG_ENV_SIZE                 0x20000 /* 128k */
> #define CONFIG_ENV_ADDR                 0x60000
> #define CONFIG_ENV_OFFSET               0x60000 /* env starts here */
> 
> In the above configuration CONFIG_ENV_SIZE == CONFIG_ENV_SECT_SIZE, that
> is, the erase block size.
> 
> If there is just one bad block in the NAND mapped for the environment
> does this mean that 'saveenv' will fail ?
> 
> If so, shouldn't CONFIG_ENV_SIZE be set to less than
> CONFIG_ENV_SECT_SIZE (but be a multiple of the write sector size) to
> allow for bad block skipping ?
> 
> I am tired and have a headache that wont go, please don't scold me too
> harshly if I am being stupid....

Reducing CONFIG_ENV_SIZE would speed up I/O and CRC calculation, but it
would not help with bad block skipping, because the granularity of
skipping is the 128k block, not the 4k page.

What you want is CONFIG_ENV_RANGE.

-Scott

  reply	other threads:[~2014-02-12 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 21:04 [U-Boot] NAND bad block Query Gray Remlin
2014-02-12 21:47 ` Scott Wood [this message]
2014-02-13 14:59   ` Gray Remlin
2014-02-13 21:52     ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392241675.6733.447.camel@snotra.buserror.net \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox