]> git.baikalelectronics.ru Git - uboot.git/commit
spl: nand: sunxi: create an helper to handle command execution
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 28 Feb 2018 19:51:50 +0000 (20:51 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 3 Apr 2018 10:11:17 +0000 (12:11 +0200)
commit2e1080f55b70a6d2032b8c3558800fde408b6aaf
tree8128a66e6e35f1dbdba3def90f4926c0b58e5263
parent017e8a2e4e2e055f66994dd1830de14da292b02b
spl: nand: sunxi: create an helper to handle command execution

Executing a command is matter of always doing the following sequence:
  * Waiting for the FIFO to be empty so we can fill it with the new
    command.
  * Clearing the status register.
  * Writing the command in the FIFO.
  * Waiting for the command to finish.

Add a nand_exec_cmd() helper to handle this instead of repeating the
logic through the various functions.

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