[MTD] [OneNAND] Check the initial bad block using ONENAND_CTRL_ERROR

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Feb 3 02:59:01 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b2581be291aa8595eadf3d6933d04d0f1d01b46d
Commit:     b2581be291aa8595eadf3d6933d04d0f1d01b46d
Parent:     e71f04fc9234b14636887ceb5862755f1690642c
Author:     Kyungmin Park <kyungmin.park at samsung.com>
AuthorDate: Thu Dec 13 09:39:29 2007 +0900
Committer:  Kyungmin Park <kyungmin.park at samsung.com>
CommitDate: Tue Jan 29 17:12:32 2008 +0900

    [MTD] [OneNAND] Check the initial bad block using ONENAND_CTRL_ERROR
    
    Some chips don't set the ONENAND_CTRL_LOAD bit.
    
    Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
 drivers/mtd/onenand/onenand_base.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index cf80093..44c327a 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1119,12 +1119,10 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
 	interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
 	ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
 
+	/* Initial bad block case: 0x2400 or 0x0400 */
 	if (ctrl & ONENAND_CTRL_ERROR) {
 		printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
-		/* Initial bad block case */
-		if (ctrl & ONENAND_CTRL_LOAD)
-			return ONENAND_BBT_READ_ERROR;
-		return ONENAND_BBT_READ_FATAL_ERROR;
+		return ONENAND_BBT_READ_ERROR;
 	}
 
 	if (interrupt & ONENAND_INT_READ) {



More information about the linux-mtd-cvs mailing list