From: Grant Edwards <grant.b.edwards@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] handling of bad blocks in nand
Date: Fri, 13 Aug 2010 21:22:21 +0000 (UTC) [thread overview]
Message-ID: <i44d2d$rk7$1@dough.gmane.org> (raw)
In-Reply-To: 20100709181543.GA4726@schlenkerla.am.freescale.net
On 2010-07-09, Scott Wood <scottwood@freescale.com> wrote:
> On Fri, Jul 09, 2010 at 08:56:40AM -0400, Ben Gardiner wrote:
>
>> If you are putting an MTD filesystem in that partition then the
>> filesystem itself will take care of bad blocks that might occur in
>> the partition during runtime. During the flash programming of this
>> filesystem using nand write.jffs2 (or .e) will skip bad blocks that
>> might occur in the partition.
>>
>> If you are putting an image (kernel or initrd) into the partition then
>> the 'nand read.e' and 'nand write.e' (as well as mtd-utils nandwrite)
>> will handle bad blocks by skipping over them.
>
> On any recent u-boot, the .jffs2/.e/.i suffixes are maintained for
> compatibility only -- bad block skipping is now the default behavior.
I'm using 1.3.4 (that's what's supported by Atmel). While that's the
current "released" version, it appears to be over two years old?
I've been reading nand flash docs and source code for a while now, and
I must admit the more I read the more questions I have.
1) Is there any documentation for the "nand" commands?
There's nothing in the manual, and doc/README.nand appears to be
incomplete, and self-contradictory. [There's no mention at all of
.e or .i, and there are contradictory descriptions for .jffs2.]
2) Are the behaviors of ".jffs2", ".e", and ".i" the same? (It
appears so from the source code.) If not how do they differ?
3) In the 1.3.4 source code, there are lots of instances where there
are boolean flags with names like "jffs2". AFAICT those flags
have nothing to do with the JFFS2 filesystem, but simply control
whether or not bad flash blocks are skipped during read/write
operations. Am I reading the code correctly?
4) If in a custom command, I want to read/write a large block of data
to/from nand flash while skipping bad blocks what functions do I
call? Right now I'm doing something like this:
nand_info[0].read(nand_info+0, offset, sizeof(buffer), &len, buffer)
nand_info[0].write(nand_info+0, offset, bytecount, &len, buffer)
but, I have a feeling that's not right (though it seems to work, I
suspect it's not going to skip bad blocks).
--
Grant Edwards grant.b.edwards Yow! Hello, GORRY-O!!
at I'm a GENIUS from HARVARD!!
gmail.com
next prev parent reply other threads:[~2010-08-13 21:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 12:40 [U-Boot] handling of bad blocks in nand Arno Steffen
2010-06-23 19:08 ` Scott Wood
2010-06-24 6:28 ` Arno Steffen
2010-06-24 7:44 ` Wolfgang Denk
2010-06-24 15:36 ` Scott Wood
2010-06-25 10:18 ` Arno Steffen
2010-06-25 15:50 ` Scott Wood
2010-06-28 13:35 ` Arno Steffen
2010-07-09 9:12 ` Arno Steffen
2010-07-09 12:56 ` Ben Gardiner
2010-07-09 18:15 ` Scott Wood
2010-08-13 21:22 ` Grant Edwards [this message]
2010-08-13 22:17 ` Grant Edwards
2010-08-16 18:55 ` Scott Wood
2010-08-16 19:13 ` Grant Edwards
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='i44d2d$rk7$1@dough.gmane.org' \
--to=grant.b.edwards@gmail.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