mtd: OneNAND: lighten scary initial bad block messages
Initial bad blocks are normal but the messages look like errors. Make the messages less scary, make the main message an informational message not a warning, make the message displaying registers a debug message and include the address there instead of in the informational message. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
263a8c8635
commit
e0c1a921f6
2 changed files with 14 additions and 12 deletions
|
@ -1484,8 +1484,7 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
|
||||||
{
|
{
|
||||||
struct onenand_chip *this = mtd->priv;
|
struct onenand_chip *this = mtd->priv;
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
unsigned int interrupt;
|
unsigned int interrupt, ctrl, ecc, addr1, addr8;
|
||||||
unsigned int ctrl;
|
|
||||||
|
|
||||||
/* The 20 msec is enough */
|
/* The 20 msec is enough */
|
||||||
timeout = jiffies + msecs_to_jiffies(20);
|
timeout = jiffies + msecs_to_jiffies(20);
|
||||||
|
@ -1497,25 +1496,28 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
|
||||||
/* To get correct interrupt status in timeout case */
|
/* To get correct interrupt status in timeout case */
|
||||||
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);
|
||||||
|
addr1 = this->read_word(this->base + ONENAND_REG_START_ADDRESS1);
|
||||||
|
addr8 = this->read_word(this->base + ONENAND_REG_START_ADDRESS8);
|
||||||
|
|
||||||
if (interrupt & ONENAND_INT_READ) {
|
if (interrupt & ONENAND_INT_READ) {
|
||||||
int ecc = onenand_read_ecc(this);
|
ecc = onenand_read_ecc(this);
|
||||||
if (ecc & ONENAND_ECC_2BIT_ALL) {
|
if (ecc & ONENAND_ECC_2BIT_ALL) {
|
||||||
printk(KERN_WARNING "%s: ecc error = 0x%04x, "
|
printk(KERN_DEBUG "%s: ecc 0x%04x ctrl 0x%04x "
|
||||||
"controller error 0x%04x\n",
|
"intr 0x%04x addr1 %#x addr8 %#x\n",
|
||||||
__func__, ecc, ctrl);
|
__func__, ecc, ctrl, interrupt, addr1, addr8);
|
||||||
return ONENAND_BBT_READ_ECC_ERROR;
|
return ONENAND_BBT_READ_ECC_ERROR;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "%s: read timeout! ctrl=0x%04x intr=0x%04x\n",
|
printk(KERN_ERR "%s: read timeout! ctrl 0x%04x "
|
||||||
__func__, ctrl, interrupt);
|
"intr 0x%04x addr1 %#x addr8 %#x\n",
|
||||||
|
__func__, ctrl, interrupt, addr1, addr8);
|
||||||
return ONENAND_BBT_READ_FATAL_ERROR;
|
return ONENAND_BBT_READ_FATAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initial bad block case: 0x2400 or 0x0400 */
|
/* Initial bad block case: 0x2400 or 0x0400 */
|
||||||
if (ctrl & ONENAND_CTRL_ERROR) {
|
if (ctrl & ONENAND_CTRL_ERROR) {
|
||||||
printk(KERN_DEBUG "%s: controller error = 0x%04x\n",
|
printk(KERN_DEBUG "%s: ctrl 0x%04x intr 0x%04x addr1 %#x "
|
||||||
__func__, ctrl);
|
"addr8 %#x\n", __func__, ctrl, interrupt, addr1, addr8);
|
||||||
return ONENAND_BBT_READ_ERROR;
|
return ONENAND_BBT_READ_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,8 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
|
||||||
if (ret || check_short_pattern(&buf[j * scanlen],
|
if (ret || check_short_pattern(&buf[j * scanlen],
|
||||||
scanlen, this->writesize, bd)) {
|
scanlen, this->writesize, bd)) {
|
||||||
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
|
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
|
||||||
printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
|
printk(KERN_INFO "OneNAND eraseblock %d is an "
|
||||||
i >> 1, (unsigned int) from);
|
"initial bad block\n", i >> 1);
|
||||||
mtd->ecc_stats.badblocks++;
|
mtd->ecc_stats.badblocks++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue