'nandwrite -o' on MLC NAND

Brian Norris computersforpeace at gmail.com
Tue Aug 2 15:01:43 EDT 2011


Hi,

For a while, I've been having problems with using `nandwrite -o' on
MLC NAND flash. Nandwrite is never able to write the combined data+OOB
properly and instead leaves the flash filled with junk. This is,
apparently, because `nandwrite -o' writes to the flash twice, once for
the page data and once for the OOB data. This is not allowed on MLC
NAND, which allow only single writes.

This is a problem with the user interface to the kernel as well as
with nandwrite itself, since there is no interface that nandwrite can
use to write data+OOB to flash in a single write. As I see it, we need
to do three things:

1) Support a (new?) ioctl that handles writing data+oob in one go. I'm
not sure if an existing interface can be extended or if this actually
has to be a new one...
2) Update nandwrite (i.e., update the libmtd routines in mtd-utils) to
utilize the new interface when possible.
3) Ensure that the raw/no-ECC options for nandwrite are operational
with the new interface (i.e., `nandwrite -r')

Comments? Has this been tried before?

BTW, I think some of the internal kernel interface is already there
for writing data+OOB; there's just no external user interface.

Thanks,
Brian



More information about the linux-mtd mailing list