Aw: Re: Linux MTD: Per Partition ECC

Brian Norris computersforpeace at gmail.com
Wed Feb 12 03:07:24 EST 2014


On Wed, Feb 12, 2014 at 08:48:18AM +0100, Ricard Wanderlof wrote:
> On Wed, 12 Feb 2014, Brian Norris wrote:
> >>In the process of using flashtool to burn NAND, it uses write() to burn
> >>the data portion, and ioctl(MEMWRITEOOB) to burn the OOB area, but this
> >>causes two writes to the same page, which violates Np for my NAND (i.e.
> >>only one write per page).  I'm looking at creating a new ioctl entry
> >>(MEMWRITEDATAOOB?) that takes both the data and oob buffers from
> >>userspace and then burns them in one operation.
> >
> >Please do not create a new one. ioctl(MEMWRITE) already exists for this
> >purpose. It can do page-at-a-time programming of data+OOB, and it even
> >has a 'mode' field for choosing ECC vs. raw (no-ECC) programming. This
> >is useful for any flash that doesn't support partial page programming.
> >The nandwrite utility from mtd-utils supports this in Linux.
> 
> I don't know if it has changed lately, but I was just looking at how
> nandwrite handles writes in RAW mode, and it appears that it does
> two separate writes in this case, one for the OOB and one for the
> main area.

It has changed.

http://git.infradead.org/mtd-utils.git/commitdiff/6a8889fbc0ea7a198628c9e3901fd88038e12d09

Brian



More information about the linux-mtd mailing list