Commit b2581be2 authored by Kyungmin Park's avatar Kyungmin Park

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

Some chips don't set the ONENAND_CTRL_LOAD bit.
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent e71f04fc
...@@ -1119,12 +1119,10 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state) ...@@ -1119,12 +1119,10 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
/* Initial bad block case: 0x2400 or 0x0400 */
if (ctrl & ONENAND_CTRL_ERROR) { if (ctrl & ONENAND_CTRL_ERROR) {
printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl); printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
/* Initial bad block case */ return ONENAND_BBT_READ_ERROR;
if (ctrl & ONENAND_CTRL_LOAD)
return ONENAND_BBT_READ_ERROR;
return ONENAND_BBT_READ_FATAL_ERROR;
} }
if (interrupt & ONENAND_INT_READ) { if (interrupt & ONENAND_INT_READ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment