]> git.baikalelectronics.ru Git - uboot.git/commit
spl: nand: sunxi: introduce the nand_wait_cmd_fifo_empty() helper
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 28 Feb 2018 19:51:48 +0000 (20:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 3 Apr 2018 10:11:07 +0000 (12:11 +0200)
commit0133099b2a57168c9fb4b1acbecb40a578fbe548
tree486f168ae9e474b6aa83256d8c100b29219091bc
parentd3d3ee303375d82e8e359e8981fcd79f339fff33
spl: nand: sunxi: introduce the nand_wait_cmd_fifo_empty() helper

One bit in the control registers indicates if the NAND controller is
ready to receive a new command. Otherwise, the command FIFO is full and
we should wait for this bit to flip. It then states that the last
command has been processed and the FIFO is now free to welcome another
command.

Add this sanity check before starting any new command.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
drivers/mtd/nand/sunxi_nand_spl.c