]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: get the ECC info from the Extended Parameter Page
authorHuang Shijie <b32955@freescale.com>
Wed, 22 May 2013 02:28:27 +0000 (10:28 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 8 Aug 2013 22:56:46 +0000 (15:56 -0700)
commit92cf7897fedfd54949513fa95bc09deb9fb4e423
tree715bc596e3c1358c4177ed0aa8b68b9ac9fad715
parentc5aeb3ffc15df976af51e7cb2a28364fe9d46c0e
mtd: get the ECC info from the Extended Parameter Page

Since the ONFI 2.1, the onfi spec adds the Extended Parameter Page
to store the ECC info.

The onfi spec tells us that if the nand chip's recommended ECC codeword
size is not 512 bytes, then the @ecc_bits is 0xff. The host _SHOULD_ then
read the Extended ECC information that is part of the extended parameter
page to retrieve the ECC requirements for this device.

This patch implement the reading of the Extended Parameter Page, and parses
the sections for ECC type, and get the ECC info from the ECC section.

Tested this patch with Micron MT29F64G08CBABAWP.

Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Reviewed-and-tested-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c