mtd: rawnand: meson: invalidate cache on polling ECC bit
authorArseniy Krasnov <avkrasnov@sberdevices.ru>
Mon, 13 Mar 2023 07:32:44 +0000 (10:32 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 22 Mar 2023 15:59:29 +0000 (16:59 +0100)
commite732e39ed9929c05fd219035bc9653ba4100d4fa
treeebe2e21dfa5bd805d042b993b828dcbcf9401377
parent9b043c649022ec55040aa9315cc72059c4ec254c
mtd: rawnand: meson: invalidate cache on polling ECC bit

'info_buf' memory is cached and driver polls ECC bit in it. This bit
is set by the NAND controller. If 'usleep_range()' returns before device
sets this bit, 'info_buf' will be cached and driver won't see update of
this bit and will loop forever.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/d4ef0bd6-816e-f6fa-9385-f05f775f0ae2@sberdevices.ru
drivers/mtd/nand/raw/meson_nand.c