[U-Boot] [PATCH RFC] nand: remove spurious read cycle in OOB first page reads

Scott Wood scottwood at freescale.com
Fri Nov 20 21:17:20 CET 2009


On Fri, Nov 20, 2009 at 03:30:46PM +0000, Nick Thompson wrote:
> In the case of a nand controller that needs the OOB data before
> it can read the page data, an unnecessary read sequence is sent
> to the nand. This reduces read performance.

By how much?  Is a similar patch going into Linux?

> This sequence is sent by default before all page reads, but the
> OOB first page read function immediately issues a new command, a
> simulated READOOB command, which overrides the previous sequence.

Is it just a performance issue, or could some NAND chips get confused by the
aborted read command?

> This patch (fragment) prevents the initial read sequence from
> being sent if chip->ecc.mode indicates OOB first operation.

I can apply this if it's needed, but I'm hesitant to keep adding workarounds
for layering problems.  Is there any way we can push all cmdfunc invocations
into replaceable functions?  Have nand_do_read_ops just be a loop around
high-level "read page" functions that are replaceable, and which can keep
their own state to determine whether autoinc is applicable.

Ideally a high-level driver like fsl_elbc_nand wouldn't have to implement
cmdfunc at all.

-Scott


More information about the U-Boot mailing list