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

The pattern of polling on a status register until a bit is set or a
timeout occurs is repeated multiple times in the driver. Mutualize the
code by introducing the nand_wait_int() helper that does wait for the
bit to flip or returns an error in case of timeout.

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