[msm] Clear relevant status registers after write and erase.

If a Program or Erase operation fails with an OP_ERR (for example when
erasing a bad block or when programming a page in bad block), then an
immediate read operation on a page from good block too fails with the
same OP_ERR. This is because the device status register (in the NAND
flash device) still has the FAIL flag set. This flag gets updated only
when a program or erase operation happens successfully.

To prevent this, clear NANDC_FLASH_STATUS and NANDC_FLASH_READ_STATUS
registers after every nand write and erase operation.
1 file changed