diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 8d4c9c253732..864327ed7fb3 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -1506,7 +1506,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, | |||
1506 | 1506 | ||
1507 | onenand_update_bufferram(mtd, from, 0); | 1507 | onenand_update_bufferram(mtd, from, 0); |
1508 | 1508 | ||
1509 | ret = onenand_bbt_wait(mtd, FL_READING); | 1509 | ret = this->bbt_wait(mtd, FL_READING); |
1510 | if (unlikely(ret)) | 1510 | if (unlikely(ret)) |
1511 | ret = onenand_recover_lsb(mtd, from, ret); | 1511 | ret = onenand_recover_lsb(mtd, from, ret); |
1512 | 1512 | ||
@@ -2527,6 +2527,10 @@ static void onenand_unlock_all(struct mtd_info *mtd) | |||
2527 | & ONENAND_CTRL_ONGO) | 2527 | & ONENAND_CTRL_ONGO) |
2528 | continue; | 2528 | continue; |
2529 | 2529 | ||
2530 | /* Don't check lock status */ | ||
2531 | if (this->options & ONENAND_SKIP_UNLOCK_CHECK) | ||
2532 | return; | ||
2533 | |||
2530 | /* Check lock status */ | 2534 | /* Check lock status */ |
2531 | if (onenand_check_lock_status(this)) | 2535 | if (onenand_check_lock_status(this)) |
2532 | return; | 2536 | return; |
@@ -3442,6 +3446,10 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) | |||
3442 | this->command = onenand_command; | 3446 | this->command = onenand_command; |
3443 | if (!this->wait) | 3447 | if (!this->wait) |
3444 | onenand_setup_wait(mtd); | 3448 | onenand_setup_wait(mtd); |
3449 | if (!this->bbt_wait) | ||
3450 | this->bbt_wait = onenand_bbt_wait; | ||
3451 | if (!this->unlock_all) | ||
3452 | this->unlock_all = onenand_unlock_all; | ||
3445 | 3453 | ||
3446 | if (!this->read_bufferram) | 3454 | if (!this->read_bufferram) |
3447 | this->read_bufferram = onenand_read_bufferram; | 3455 | this->read_bufferram = onenand_read_bufferram; |
@@ -3559,7 +3567,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) | |||
3559 | mtd->owner = THIS_MODULE; | 3567 | mtd->owner = THIS_MODULE; |
3560 | 3568 | ||
3561 | /* Unlock whole block */ | 3569 | /* Unlock whole block */ |
3562 | onenand_unlock_all(mtd); | 3570 | this->unlock_all(mtd); |
3563 | 3571 | ||
3564 | ret = this->scan_bbt(mtd); | 3572 | ret = this->scan_bbt(mtd); |
3565 | if ((!FLEXONENAND(this)) || ret) | 3573 | if ((!FLEXONENAND(this)) || ret) |