All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH RFC] nand: remove spurious read cycle in OOB first page reads
@ 2009-11-20 15:30 Nick Thompson
  2009-11-20 20:17 ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Thompson @ 2009-11-20 15:30 UTC (permalink / raw)
  To: u-boot

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.

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.

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

Signed-off-by: Nick Thompson <nick.thompson@gefanuc.com>
---

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 426bb95..cf85bde 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1261,7 +1272,9 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
                        bufpoi = aligned ? buf : chip->buffers->databuf;

                        if (likely(sndcmd)) {
-                               chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
+                               if (chip->ecc.mode != NAND_ECC_HW_OOB_FIRST)
+                                       chip->cmdfunc(mtd, NAND_CMD_READ0,
+                                                     0x00, page);
                                sndcmd = 0;
                        }

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

end of thread, other threads:[~2009-11-30 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 15:30 [U-Boot] [PATCH RFC] nand: remove spurious read cycle in OOB first page reads Nick Thompson
2009-11-20 20:17 ` Scott Wood
2009-11-23 10:38   ` Nick Thompson
2009-11-30 17:02     ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.