nand: fix wait ready condition for samsung slc.
authorYonghui Yu <yonghui.yu@amlogic.com>
Wed, 19 Apr 2017 02:47:50 +0000 (10:47 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 27 Apr 2017 06:03:30 +0000 (23:03 -0700)
PD#142961: only status[7] of samsung indicate the R/B status, as others
using status[6:7].

Change-Id: I6b6030c868f81e250b4c96629025c1aeeb7b7d65
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
drivers/amlogic/mtd/aml_nand.c

index 9085554..433272a 100644 (file)
@@ -677,7 +677,8 @@ retry_status:
                                /* udelay(200); */
                        }
                        status[i] = (int)chip->read_byte(mtd);
-                       if ((read_status++ < 3) && (status[i] != 0xe0)) {
+                       if ((read_status++ < 3)
+                               && (!(status[i] & NAND_STATUS_READY))) {
                                pr_info("after write,read %d status =%d fail\n",
                                        read_status, status[i]);
                                goto retry_status;