From: Josh Wu Date: Mon, 19 Aug 2013 10:05:44 +0000 (+0800) Subject: mtd: atmel_nand: pmecc: fix failure to correct bit error in 1024-bytes sector X-Git-Tag: v3.12-rc1~82^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fa831f9db1f1a13960f4ea0fd0454402717b453;p=pandora-kernel.git mtd: atmel_nand: pmecc: fix failure to correct bit error in 1024-bytes sector The PMECC use BCH algorithm to correct error. In BCH algorithm, the primitive polynomial value is GF(2^13) for 512-bytes sector size. And it is GF(2^14) for 1024-bytes sector size. This patch will choose correct degree of the remainders (13 or 14) for different sector size. Tested in AT91SAM9X5-EK with MLC nand flash. More detail can be found in ยง5.4.1 of: AT91SAM ARM-based Embedded MPU Application Note Signed-off-by: Josh Wu Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed