mtd: rawnand: mxc: separate page read from ecc calc
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 22 May 2024 05:39:51 +0000 (07:39 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Jul 2024 09:51:16 +0000 (11:51 +0200)
commit94beaa25c78e67787d72b9cf5765fdc5216b226e
tree91f6d055ce0e6628854c93fb574e6482b1df7291
parent04a81b4f9ba1a473af7715168306c23ca4e15a25
mtd: rawnand: mxc: separate page read from ecc calc

Our read_page hook currently reads out a page and also counts and
returns the number of bitflips. In upcoming exec_op conversion we'll
need to read the page data in exec_op, but the bitflip information
will be needed in mxc_nand_read_page(). To ease exec_op conversion
separate the page read out from the bitflip evaluation.

For the v2/v3 controllers we can leave the bitflip information in the
status register for later evaluation. For the v1 controller this is
not possible, because the status register is overwritten with each
subpage read. We therefore store the bitflip information in the private
data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240522-mtd-nand-mxc-nand-exec-op-v4-1-75b611e0ac44@pengutronix.de
drivers/mtd/nand/raw/mxc_nand.c