mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement.
authorJosh Wu <josh.wu@atmel.com>
Wed, 23 Jan 2013 12:47:12 +0000 (20:47 +0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 12 Feb 2013 15:01:02 +0000 (17:01 +0200)
commit84cfbbb85a98c8c89407f108da9d102e5dfe2ae5
tree89e04400380e86c9421be61318796d49084fa679
parente66b4318f8fc0e12421de6287c557cdd92789010
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 <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/atmel_nand.c
This page took 0.026788 seconds and 5 git commands to generate.