]> git.karo-electronics.de Git - linux-beck.git/commit
mtd: nand: Request strength instead of bytes for soft BCH
authorAaron Sierra <asierra@xes-inc.com>
Wed, 14 Jan 2015 23:41:31 +0000 (17:41 -0600)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 2 Feb 2015 05:10:58 +0000 (21:10 -0800)
commite0377cdebaf3913bff693c9eea17ff6eb4d7abc8
tree4af65d7984f566492e043f4376757fbcf726c03d
parent240181fd0ffa69cac08d6b06c94e843707370f5f
mtd: nand: Request strength instead of bytes for soft BCH

Previously, we requested that drivers pass ecc.size and ecc.bytes when
using NAND_ECC_SOFT_BCH. However, a driver is likely to only know the ECC
strength required for its NAND, so each driver would need to perform a
strength-to-bytes calculation.

Avoid duplicating this calculation in each driver by asking drivers to
pass ecc.size and ecc.strength so that the strength-to-bytes calculation
need only be implemented once.

This reverts/generalizes this commit:
    mtd: nand: Base BCH ECC bytes on required strength

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nandsim.c
drivers/mtd/nand/sunxi_nand.c