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] [PATCH] - fix "nand erase clean" problem
Date: Mon, 27 Oct 2008 14:49:40 -0500	[thread overview]
Message-ID: <49061B54.2060904@freescale.com> (raw)
In-Reply-To: <490618E5.9080609@ronetix.at>

Ilko Iliev wrote:
>> Why must the cleanmarker fit in the first free segment?
>>   
> The Linux NAND driver looks for the cleanmarkers at this place.

AFAICT, it does a read using MTD_OOB_AUTO, which can span multiple free 
segments.

>> What if oobsize > 64 (as with 4k pages)?  Why write anything at all if
>> you're not going to write the cleanmarker?  Why badblockpos & ~1 (I know
>> existing code does it, but why)?
>>   
> The current Linux NAND Flash driver supports 8, 16 and 64 bytes OOB.

No need to add a place that will silently break if that changes, though.

I think what needs to be done is a write to offset zero using 
MTD_OOB_AUTO.  If it doesn't fit, then an error will be returned.

>> Set ooboffs to zero, and use MTD_OOB_AUTO.
>>
> I think the NAND driver should work not only with MTD_OOB_AUTO.

Explain?  MTD_OOB_AUTO is a feature of the NAND subsystem, which 
automatically places user OOB data in the free regions described by the 
low-level driver.  It's not some hardware feature that may or may not be 
present.

-Scott

  reply	other threads:[~2008-10-27 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26 16:48 [U-Boot] [PATCH] - fix "nand erase clean" problem Ilko Iliev
2008-10-27 18:50 ` Scott Wood
2008-10-27 19:39   ` Ilko Iliev
2008-10-27 19:49     ` Scott Wood [this message]
2008-10-28 10:45       ` Ilko Iliev
2008-10-28 16:55         ` 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=49061B54.2060904@freescale.com \
    --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