[U-Boot] [U-boot] Is there generic code to detect nand chip's ecc bits?

Hi, Scott:
I have a question about nand chip's ecc bits:
Nand chip usually declared its ecc bits for each 512 bytes in its data sheet.
Such as:
Some nand chips required 4bit ECC for each 512 bytes.
Some nand chips required 2bit ECC for each 512 bytes.
So, my question is:
Could ecc bits be got from nand chip's flash id?
Or other generic method to retrieve ECC bits required for every nand chip?
Best wishes,

On Thu, 2014-04-17 at 18:19 +0800, TigerLiu@via-alliance.com wrote:
Hi, Scott:
I have a question about nand chip’s ecc bits:
Nand chip usually declared its ecc bits for each 512 bytes in its data sheet.
Such as:
Some nand chips required 4bit ECC for each 512 bytes.
Some nand chips required 2bit ECC for each 512 bytes.
So, my question is:
Could ecc bits be got from nand chip’s flash id?
Or other generic method to retrieve ECC bits required for every nand chip?
I believe the ONFI data has this information. For chips/controllers that don't support ONFI, you'd have to deal with vendor specific extended ID encoding (if the information is there at all).
-Scott
participants (2)
-
Scott Wood
-
TigerLiu@via-alliance.com