mtd: nand: pxa3xx: simplify ECC hardware parameters
authorChris Packham <judge.packham@gmail.com>
Thu, 25 Aug 2022 04:59:49 +0000 (16:59 +1200)
committerStefan Roese <sr@denx.de>
Thu, 6 Oct 2022 08:15:34 +0000 (10:15 +0200)
commit1ba0018218e141d444d75e9a59e397704292fe68
treee380d3eb097e5cba70f91beca39113360e3d0c5c
parent88383fd8649577cf899bc61362e94c8a392f0b9f
mtd: nand: pxa3xx: simplify ECC hardware parameters

Replace the if/else chain in pxa_ecc_init() with a lookup table. This
makes the code more concise and hopefully easier to follow. Remove the
unused ecc_layout tables and replace it with a single dummy one (the
pxa3xx driver has never used this but the mtd subsystem expects it to be
provided).

Tested on an Allied Telesis x530 switch with Micron MT29F2G08ABAEAWP
NAND Flash.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
drivers/mtd/nand/raw/pxa3xx_nand.c