mtd: nand: gpmi: may use minimum required ecc for 744 oobsize NAND
authorHan Xu <b45815@freescale.com>
Wed, 2 Dec 2015 22:47:43 +0000 (16:47 -0600)
committerBrian Norris <computersforpeace@gmail.com>
Sat, 23 Jan 2016 22:45:57 +0000 (14:45 -0800)
commitb8b0e465ddb0c9cb16089ddfed68a8569e006465
tree94a427e183a5d84121ef44fd8237d3f9a6c9e2ba
parent026918e71111afe88382f8d800a852d3e36bf3d4
mtd: nand: gpmi: may use minimum required ecc for 744 oobsize NAND

By default NAND driver will choose the highest ecc strength that oob
could contain, in this case, for some 8K+744 NAND flash, the ecc
strength will be up to 52bit, which beyonds the i.MX6QDL BCH capability
(40bit).

This patch allows the NAND driver try to use minimum required ecc
strength if it failed to use the highest ecc, even without explicitly
claiming "fsl,use-minimum-ecc" in dts.

Signed-off-by: Han Xu <b45815@freescale.com>
Acked-by: Huang Shijie <shijie.huang@arm.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c