mtd: eLBC NAND: use recommended command sequences
authorScott Wood <scottwood@freescale.com>
Fri, 13 Nov 2009 20:13:01 +0000 (14:13 -0600)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 09:53:49 +0000 (09:53 +0000)
commit476459a6cf46d20ec73d9b211f3894ced5f9871e
tree38825d12755f3ff540b15a8f42ebeb6bab6d10f1
parentb3a70f0bc32d1b70584bcaa6019fa4260b0da92e
mtd: eLBC NAND: use recommended command sequences

Currently, the program and erase sequences do not wait for completion,
instead relying on a subsequent waitfunc() callback.  However, this causes
the chipselect to be deasserted while the NAND chip is still asserting the
busy pin, which can corrupt activity on other chipselects.

This patch switches to using the sequences recommended by the manual,
in which a wait is performed within the initial command sequence.  We can
now re-use the status byte from the initial command sequence, rather than
having to do another status read in the waitfunc.

Since we're already touching the command sequences, it also cleans up some
cruft in SEQIN that isn't needed since we cannot program partial pages
outside of OOB.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reported-by: Suchit Lepcha <suchit.lepcha@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/fsl_elbc_nand.c