[U-Boot] [PATCH 4/4] mtd: vf610_nfc: support subpage write
Bill Pringlemeir
bpringlemeir at nbsps.com
Tue Apr 7 15:48:32 CEST 2015
On 3 Apr 2015, stefan at agner.ch wrote:
> I will remove the page read on NAND_CMD_SEQIN, since we memcpy the
> full page anyway. I also just realized that the page read actually
> happens always and hence slows down even full page writes...
Yes, I remove this in Linux (4.0) and it corrupted things when writing.
I think your previous conclusion about we never use 'write caching' was
wrong.
This one is for writes,
case NAND_CMD_SEQIN: /* Pre-read for partial writes. */
This one is for reads,
case NAND_CMD_READ0:
The interface between 'nand_base' and the MTD driver is hard to
decipher. Does Scott (or anyone) know if there is any documentation on
this?
Stefan is completely correct that if a full page is being written, then
the 'SEQIN' should not read a page. However, I only see 'column' being
passed. How is 'SEQIN' and 'PAGEPROG' to detect if a full page is being
written or not?
The other way to handle things would to be to investigate the
NFC_CFG[PAGE_CNT] and NFC_SECSZ to have the virtual pages support
sub-pages. I think the OOB mapping would be non-standard in such cases.
The buffer management in the driver is most simple in it's current form.
The other versions that I found seemed to be buggy to me. However, the
current driver doesn't use all of the NFC SRAM buffer space.
Btw, the READ_OOB is very nice for Linux as well. It is a much faster
mount of UBI/UbiFs as well.
Fwiw,
Bill Pringlemeir.
More information about the U-Boot
mailing list