commit | 28f7a9d375c8bc7a30563b8d995b9baa355c7e41 | [log] [tgz] |
---|---|---|
author | Miquel Raynal <miquel.raynal@bootlin.com> | Wed Feb 28 20:51:47 2018 +0100 |
committer | Maxime Ripard <maxime.ripard@bootlin.com> | Tue Apr 03 12:11:04 2018 +0200 |
tree | ec067ee6f0c326340ad1070a53067c18d54253f2 | |
parent | 802f766994ded5afc9d89e93556011063a430e0d [diff] |
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>