mtd: rawnand: meson: waiting w/o wired ready/busy pin
authorArseniy Krasnov <AVKrasnov@sberdevices.ru>
Thu, 8 Jun 2023 04:47:28 +0000 (07:47 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jun 2023 15:21:15 +0000 (17:21 +0200)
commitc17a90a46a712b78578dd7156380fdd515a2af9d
tree2c7f9d695134501cf07d2d9a22e011ebaec57b1f
parent262bc0096b7c9122f5f815f094b068a1496a20f6
mtd: rawnand: meson: waiting w/o wired ready/busy pin

If there is no wired ready/busy pin, classic way to wait for command
completion is to use function 'nand_soft_waitrdy()'. Meson NAND has
special command which allows to wait for NAND_STATUS_READY bit without
reading status in a software loop (as 'nand_soft_waitrdy()' does). To
use it send this command along with NAND_CMD_STATUS, then wait for an
interrupt, and after interrupt send NAND_CMD_READ0. So this feature
allows to use interrupt driven waiting without wired ready/busy pin.

Suggested-by: Liang Yang <liang.yang@amlogic.com>
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230608044728.1328506-3-AVKrasnov@sberdevices.ru
drivers/mtd/nand/raw/meson_nand.c