mtd: nand: added nand_shutdown
authorScott Branden <sbranden@broadcom.com>
Thu, 20 Nov 2014 19:18:05 +0000 (11:18 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 8 Jan 2015 01:54:28 +0000 (17:54 -0800)
commit72ea403669c7d49e8c407c61205b6d52438d39ab
tree79048fb55c8a01a1c82603ff36ef62c93ffdb745
parent3efe41be224c4441f2a872a25471a14d85ceb7c6
mtd: nand: added nand_shutdown

Add nand_shutdown to wait for current nand operations to finish and prevent
further operations by changing the nand flash state to FL_SHUTDOWN.

This is addressing a problem observed during reboot tests using UBIFS
root file system: NAND erase operations that are in progress during
system reboot/shutdown are causing partial erased blocks. Although UBI should
be able to detect and recover from this error, this change will avoid
the creation of partial erased blocks on reboot in the middle of a NAND erase
operation.

Signed-off-by: Scott Branden <sbranden@broadcom.com>
Tested-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c