public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] nand: Use common read function instead of verify_buf()
Date: Mon, 26 Jan 2015 17:17:49 -0600	[thread overview]
Message-ID: <1422314269.30267.5.camel@xes-inc.com> (raw)
In-Reply-To: <1422311600.10544.23.camel@freescale.com>


On Mon, 2015-01-26 at 16:33 -0600, Scott Wood wrote:
> On Mon, 2015-01-26 at 16:24 -0600, Peter Tyser wrote:
> > The driver-specific verify_buf() function can be replaced with the
> > standard read_page_raw() function to verify writes.  This will 
> > allow
> > verify_buf() to be removed from individual drivers.  verify_buf() 
> > is no
> > longer supported in mainline Linux, so it is a pain to continue
> > supporting.
> 
> Any reason not to just remove this feature from U-Boot, as Linux has
> done?

The Linux change for reference: 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=657f28f8811c92724db10d18bbbec70d540147d6

I waffled about removing it, but leaned towards leaving it in because:
- I didn't want to change the existing U-Boot behavior for other 
users.  A google of 'u-boot "nand write"' shows a lot of examples that 
don't include verification of writes, and they should if we remove 
auto-verification.

- The reason it was removed in Linux was "Both UBI and JFFS2 are able 
to read verify what they wrote already.  There are also MTD tests 
which do this verification."  I thought U-Boot was more likely than 
Linux to use raw NAND writes without a filesystem, so leaving it in U-
Boot made sense since the UBI/JFFS2 logic didn't apply as much here.



- I didn't think a lot of people would know they have to explicitly 
verify NAND contents after a write, since they'd assume it was like 
other memories that aren't as lossy.

- The penalty of slightly different code from Linux and a small 
performance hit was worth the gain of auto-verification to me.  I 
viewed consolidating it into one small chunk of code as a happy medium.


The philosophical side of me said to remove it altogether, so I can 
see that perspective too.
Peter

  reply	other threads:[~2015-01-26 23:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 22:24 [U-Boot] [PATCH 1/5] nand: Use common read function instead of verify_buf() Peter Tyser
2015-01-26 22:24 ` [U-Boot] [PATCH 2/5] mtd: davinci_nand: " Peter Tyser
2015-01-26 22:24 ` [U-Boot] [PATCH 3/5] mtd: nand: Remove nand_verify_buf() function Peter Tyser
2015-01-26 22:24 ` [U-Boot] [PATCH 4/5] mtd: nand: Use ECC for NAND write verification Peter Tyser
2015-01-26 22:24 ` [U-Boot] [PATCH 5/5] mtd: davinci " Peter Tyser
2015-01-26 22:33 ` [U-Boot] [PATCH 1/5] nand: Use common read function instead of verify_buf() Scott Wood
2015-01-26 23:17   ` Peter Tyser [this message]
2015-01-27  1:25     ` Scott Wood
2015-01-27 23:47       ` Peter Tyser
2015-01-29 23:02         ` Scott Wood
2015-01-29 23:37           ` Peter Tyser
2015-01-30  0:58             ` 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=1422314269.30267.5.camel@xes-inc.com \
    --to=ptyser@xes-inc.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