mtd: rawnand: meson: fix bitmask for length in command word
authorArseniy Krasnov <avkrasnov@sberdevices.ru>
Wed, 29 Mar 2023 07:47:26 +0000 (10:47 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 3 Apr 2023 15:58:01 +0000 (17:58 +0200)
commit93942b70461574ca7fc3d91494ca89b16a4c64c7
tree29ec4af593ae7a613efce02c8e26547a632cdef8
parent0c3089601f064d80b3838eceb711fcac04bceaad
mtd: rawnand: meson: fix bitmask for length in command word

Valid mask is 0x3FFF, without this patch the following problems were
found:

1) [    0.938914] Could not find a valid ONFI parameter page, trying
                  bit-wise majority to recover it
   [    0.947384] ONFI parameter recovery failed, aborting

2) Read with disabled ECC mode was broken.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/3794ffbf-dfea-e96f-1f97-fe235b005e19@sberdevices.ru
drivers/mtd/nand/raw/meson_nand.c