mtd: nand: ecc-bch: Create the software BCH engine
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 29 Sep 2020 23:01:13 +0000 (01:01 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 10 Dec 2020 21:37:26 +0000 (22:37 +0100)
commit9994bb3f36e3d181d9f0a078609038080cfd7a3d
tree000d2c2234dcf4c98359351266f82150af8d0f91
parent80fe603160a4732a08f0f08f3e3312a3f3a79eee
mtd: nand: ecc-bch: Create the software BCH engine

Let's continue introducing the generic ECC engine abstraction in the
NAND subsystem by instantiating a first ECC engine: the software
BCH one.

While at it, make a very tidy ecc_sw_bch_init() function and move all
the sanity checks and user input management in
nand_ecc_sw_bch_init_ctx(). This second helper will be called from the
raw RAND core.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-10-miquel.raynal@bootlin.com
drivers/mtd/nand/ecc-sw-bch.c
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/nand-ecc-sw-bch.h
include/linux/mtd/nand.h