mtd: rawnand: sunxi: Precompute the ECC_CTL register value
authorSamuel Holland <samuel@sholland.org>
Sat, 4 Feb 2023 14:35:20 +0000 (08:35 -0600)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 6 Feb 2023 11:53:08 +0000 (12:53 +0100)
commitef3e6327ff04af8527b3558e023e99f1cc241bce
treeb36d07c2aabcd4907fe9c6901d6b923fea37bc61
parentac1c7072e38e492b27353a6e7b144e64cbbf9495
mtd: rawnand: sunxi: Precompute the ECC_CTL register value

The value computed by this function never changes for a given chip.
Compute the whole register value once up front, instead of every time
the ECC engine is enabled.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230204143520.9682-4-samuel@sholland.org
drivers/mtd/nand/raw/sunxi_nand.c