]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: gpmi: add a new DT property to use the datasheet's minimum required ECC
authorHuang Shijie <b32955@freescale.com>
Thu, 7 Nov 2013 10:07:38 +0000 (18:07 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 3 Jan 2014 19:22:08 +0000 (11:22 -0800)
commitdfca02ec8ad25f77e44a66ee74f93dae602e0234
tree8f492a36b22654a287c24b31d70c5326351beedd
parentd7967b1ddc3527f00ad505f404afd8d25c37f8ae
mtd: gpmi: add a new DT property to use the datasheet's minimum required ECC

In default way, we use the ecc_strength/ecc_step size calculated by ourselves
and use all the OOB area.

This patch adds a new property : "fsl,use-minimum-ecc"

If we enable it, we will firstly try to use the datasheet's minimum required
ECC provided by the MTD layer (the ecc_strength_ds/ecc_step_ds fields
in the nand_chip{}). So we may have free space in the OOB area by using the
minimum ECC, and we may support JFFS2 with some SLC NANDs, such as Micron's
SLC NAND.

If we fail to use the minimum ECC, we will use the legacy method to calculate
the ecc_strength and ecc_step size.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Documentation/devicetree/bindings/mtd/gpmi-nand.txt
drivers/mtd/nand/gpmi-nand/gpmi-nand.c