Discussion:
Reading less than page size from NAND ok?
Ricard Wanderlof
2006-10-18 11:22:38 UTC
Permalink
In the NAND boot code for U-Boot 1.4.4 (which use MTD (albeit an old
version)), there is a note that when reading from NAND flash via the mtd
layer (i.e. eventually ending up in nand_do_read_ecc()), one should start
reading on a page boundary and read at least one page of data, in order to
get proper ECC behavior.

However, when looking at the latest mtd code, it appears that this no
longer is the case - when reading bursts of data less than one page, the
data is internally buffered and a complete page read so that ECC is always
applied properly. Is this in fact the case, or have I missed something
vital here? (Was there such a limitation once?)

/Ricard
--
Ricard Wolf Wanderl?f ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
Artem Bityutskiy
2006-10-18 11:28:17 UTC
Permalink
Post by Ricard Wanderlof
In the NAND boot code for U-Boot 1.4.4 (which use MTD (albeit an old
version)), there is a note that when reading from NAND flash via the mtd
layer (i.e. eventually ending up in nand_do_read_ecc()), one should start
reading on a page boundary and read at least one page of data, in order to
get proper ECC behavior.
However, when looking at the latest mtd code, it appears that this no
longer is the case - when reading bursts of data less than one page, the
data is internally buffered and a complete page read so that ECC is always
applied properly. Is this in fact the case, or have I missed something
vital here? (Was there such a limitation once?)
I am not sure about the past, but now you can read from any offset and
any number of bytes using MTD interface, even though you read from NAND
flash which has minimal I/O unit = 1 NAND page. MTD takes care of this.
--
Best regards,
Artem Bityutskiy (???????? ?????)
Loading...