]> git.karo-electronics.de Git - karo-tx-linux.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, 22 Nov 2013 22:12:45 +0000 (14:12 -0800)
commitcfc8296e46c3f6a57b69b3e602f4efd66d973e39
tree75bf87783c2786a8de3b7953dca75adda074c901
parent28b0b889a119ec84e1916be5e1b2b163335a6878
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