Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45700
b: refs/heads/master
c: 2fd32d4
h: refs/heads/master
v: v3
  • Loading branch information
Kyungmin Park authored and Artem Bityutskiy committed Jan 10, 2007
1 parent cb8e5c5 commit 38fe50e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61a7e1983e773b93aac172dadc97f1eb484536b4
refs/heads/master: 2fd32d4af83f4535d12d3f6dd23189352a9596fa
5 changes: 3 additions & 2 deletions trunk/drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static int onenand_wait(struct mtd_info *mtd, int state)
unsigned long timeout;
unsigned int flags = ONENAND_INT_MASTER;
unsigned int interrupt = 0;
unsigned int ctrl, ecc;
unsigned int ctrl;

/* The 20 msec is enough */
timeout = jiffies + msecs_to_jiffies(20);
Expand All @@ -324,14 +324,15 @@ static int onenand_wait(struct mtd_info *mtd, int state)
}

if (interrupt & ONENAND_INT_READ) {
ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
if (ecc) {
DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC error = 0x%04x\n", ecc);
if (ecc & ONENAND_ECC_2BIT_ALL)
mtd->ecc_stats.failed++;
else if (ecc & ONENAND_ECC_1BIT_ALL)
mtd->ecc_stats.corrected++;
}
return ecc;
}

return 0;
Expand Down

0 comments on commit 38fe50e

Please sign in to comment.