]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: pxa3xx: make ECC configuration checks more explicit
authorBrian Norris <computersforpeace@gmail.com>
Thu, 14 Nov 2013 22:41:32 +0000 (14:41 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 22 Nov 2013 22:13:04 +0000 (14:13 -0800)
commite97a1a8a4c577dc44164e77e7a78626906ebed1c
tree5ef5d0abf27b3aab85528f3603aca678e929882b
parent693233b6d303fdf285d5bb40e974b832156f6b1b
mtd: nand: pxa3xx: make ECC configuration checks more explicit

The Armada BCH configuration in this driver uses one of the two
following ECC schemes:

 16-bit correction per 2048 bytes
 16-bit correction per 1024 bytes

These are sufficient for mapping to the 4-bit per 512-bytes and 8-bit
per 512-bytes (respectively) minimum correctability requirements of many
common NAND.

The current code only checks for the required strength (4-bit or 8-bit)
without checking the ECC step size that is associated with that strength
(and simply assumes it is 512). While that is often a safe assumption to
make, let's make it explicit, since we have that information.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Daniel Mack <zonque@gmail.com>
drivers/mtd/nand/pxa3xx_nand.c