diff options
author | Ivan Djelic <ivan.djelic@parrot.com> | 2012-04-30 12:17:18 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-14 06:25:51 +0200 |
commit | 0e618ef0a6a33cf7ef96c2c824402088dd8ef48c (patch) | |
tree | 308d1554fe7139f6df1577a7387703cde7cf342a /fs | |
parent | ARM: OMAP3: gpmc: add BCH ecc api and modes (diff) | |
download | linux-0e618ef0a6a33cf7ef96c2c824402088dd8ef48c.tar.xz linux-0e618ef0a6a33cf7ef96c2c824402088dd8ef48c.zip |
mtd: nand: omap: add support for hardware BCH ecc
Two modes are supported: 4-bit and 8-bit error correction.
Note that 4-bit mode is only confirmed to work on OMAP3630 ES 1.x,
x >= 1. The OMAP3 GPMC hardware BCH engine computes remainder
polynomials, it does not provide automatic error location and
correction: this step is implemented using the BCH library.
This implementation only protects page data, there is no support
for protecting user-defined spare area bytes (this could be added
with few modifications); therefore, it cannot be used with YAFFS2
or other similar filesystems that depend on oob storage.
Before being stored to nand flash, hardware BCH ecc is adjusted
so that an erased page has a valid ecc; thus allowing correction of
bitflips in blank pages (also common on 4-bit devices).
BCH correction mode is selected at runtime by setting platform data
parameter 'ecc_opt' to value OMAP_ECC_BCH4_CODE_HW or
OMAP_ECC_BCH8_CODE_HW.
This code has been tested with mtd test modules, UBI and UBIFS on a
BeagleBoard revC3 (OMAP3530 ES3.0 + Micron NAND 256MiB 1,8V 16-bit).
Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions