commit | b0b98caf71d9d589c75cc05a90e603a8277a20d5 | [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 | a450de7db1377eb364fa79f162357c6253027fad [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>