public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] NAND bad block Query
@ 2014-02-12 21:04 Gray Remlin
  2014-02-12 21:47 ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Gray Remlin @ 2014-02-12 21:04 UTC (permalink / raw)
  To: u-boot

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....

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-13 21:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 21:04 [U-Boot] NAND bad block Query Gray Remlin
2014-02-12 21:47 ` Scott Wood
2014-02-13 14:59   ` Gray Remlin
2014-02-13 21:52     ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox