Skip to content
Snippets Groups Projects
Commit 1bd3e2a8 authored by Wu, Josh's avatar Wu, Josh Committed by Andreas Bießmann
Browse files

mtd: atmel_nand: pmecc: fix bug fail 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 refered to section 5.4.1 of:
  AT91SAM ARM-based Embedded MPU Application Note
  <http://www.atmel.com/Images/doc11127.pdf

>

Signed-off-by: default avatarJosh Wu <josh.wu@atmel.com>
Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
parent 4eef93da
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment