| .. | .. |
|---|
| 527 | 527 | const struct nand_page_io_req *req, |
|---|
| 528 | 528 | bool ecc_enabled) |
|---|
| 529 | 529 | { |
|---|
| 530 | | - u8 status; |
|---|
| 530 | + u8 status = 0; |
|---|
| 531 | 531 | int ret; |
|---|
| 532 | 532 | |
|---|
| 533 | 533 | ret = spinand_load_page_op(spinand, req); |
|---|
| .. | .. |
|---|
| 535 | 535 | return ret; |
|---|
| 536 | 536 | |
|---|
| 537 | 537 | ret = spinand_wait(spinand, &status); |
|---|
| 538 | + /* |
|---|
| 539 | + * When there is data outside of OIP in the status, the status data is |
|---|
| 540 | + * inaccurate and needs to be reconfirmed |
|---|
| 541 | + */ |
|---|
| 542 | + if (spinand->id.data[0] == 0x01 && status && !ret) |
|---|
| 543 | + ret = spinand_wait(spinand, &status); |
|---|
| 544 | + |
|---|
| 538 | 545 | if (ret < 0) |
|---|
| 539 | 546 | return ret; |
|---|
| 540 | 547 | |
|---|
| .. | .. |
|---|
| 866 | 873 | &skyhigh_spinand_manufacturer, |
|---|
| 867 | 874 | &toshiba_spinand_manufacturer, |
|---|
| 868 | 875 | &unim_spinand_manufacturer, |
|---|
| 876 | + &unim_zl_spinand_manufacturer, |
|---|
| 869 | 877 | &winbond_spinand_manufacturer, |
|---|
| 870 | 878 | &xincun_spinand_manufacturer, |
|---|
| 871 | 879 | &xtx_spinand_manufacturer, |
|---|
| .. | .. |
|---|
| 1111 | 1119 | if (ret) |
|---|
| 1112 | 1120 | return ret; |
|---|
| 1113 | 1121 | |
|---|
| 1122 | + /* HWP_EN must be enabled first before block unlock region is set */ |
|---|
| 1123 | + if (spinand->id.data[0] == 0x01) { |
|---|
| 1124 | + ret = spinand_lock_block(spinand, HWP_EN); |
|---|
| 1125 | + if (ret) |
|---|
| 1126 | + return ret; |
|---|
| 1127 | + } |
|---|
| 1128 | + |
|---|
| 1114 | 1129 | ret = spinand_lock_block(spinand, BL_ALL_UNLOCKED); |
|---|
| 1115 | 1130 | if (ret) |
|---|
| 1116 | 1131 | return ret; |
|---|