Many NAND page layouts have been added to the Marvell NAND controller
but could not be used in practice so they are being removed.

Regarding the SPI-NAND area, Gigadevice chips were not using the right
buffer for an ECC status check operation.

Aside from these driver fixes, there is also a refcount fix in the MTD
core nodes parsing logic.
mtd: rawnand: marvell: fix layouts

The check in nand_base.c, nand_scan_tail() : has the following code:
(ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
Remove ECC entries in this driver which are not integral multiplications,
and adjust the number of chunks for entries which fails the above
calculation so it will calculate correctly (this was previously done
automatically before the check and was removed in a later commit).

Fixes: 68c18dae6888 ("mtd: rawnand: marvell: add missing layouts")
Cc: stable@vger.kernel.org
Signed-off-by: Elad Nachman <enachman@marvell.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 file changed