From: Josh Wu Date: Wed, 23 Jan 2013 12:47:12 +0000 (+0800) Subject: mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement. X-Git-Tag: v3.9-rc1~18^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84cfbbb85a98c8c89407f108da9d102e5dfe2ae5;p=pandora-kernel.git mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement. This patch will check NAND flash's ecc minimum requirement in ONFI parameter. 1. if pmecc-cap, pmecc-sector-size is set in dts. then use it. Driver will print out a WARNING if the values are different from ONFI parameters. 2. if pmecc-cap, pmecc-sector-size is not set in dts, then use the value from ONFI parameters. * If ONFI ECC parameters are in ONFI extended parameter page, since we are not support it, so assume the minimum ecc requirement is 2 bits in 512 bytes. * For non-ONFI support nand flash, also assume the minimum ecc requirement is 2 bits in 512 bytes. Signed-off-by: Josh Wu Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed