mtd: docg3: add ECC correction code
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 19 Nov 2011 15:02:55 +0000 (16:02 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:07:26 +0000 (18:07 +0000)
commitd13d19ece39f20bf097782e1812a9c31a5a4fcf1
tree8ea5f606a95f7e3761e55945f247c818dfb0dfc0
parent7a7fcf14021bc0f0728dd0aaa2635475de0db54c
mtd: docg3: add ECC correction code

Credit for discovering the BCH algorith parameters, and bit
reversing algorithm is to be give to Mike Dunn and Ivan
Djelic.

The BCH correction code relied upon the BCH library, where
all data and ECC is bit-reversed. The BCH library works
correctly when each input byte is bit-reversed, and
accordingly ECC output is also bit-reversed.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/Kconfig
drivers/mtd/devices/docg3.c
drivers/mtd/devices/docg3.h