summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/davinci_nand.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-09-03 14:35:37 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-10-25 02:49:41 +0400
commit2bdb053a8119355eada46dfab88782449a26b39d (patch)
tree26035a9c40cf6bcfe2c43ec24636879a58ac805e /drivers/mtd/nand/davinci_nand.c
parentf2df1ae3fe8d44d51bd7218a9da9134b83c7531e (diff)
downloadlinux-2bdb053a8119355eada46dfab88782449a26b39d.tar.xz
mtd: davinci: relax a timeout for ECC-initialization
Sudhakar found out that 100µs are enough. Sadly, his updated patch was overlooked and an older version still using 100ms was merged. Fix this. Reference: http://patchwork.ozlabs.org/patch/59180/ Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/davinci_nand.c')
-rw-r--r--drivers/mtd/nand/davinci_nand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index e7129591c9c7..ad51f8ef0d4f 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -313,7 +313,7 @@ static int nand_davinci_correct_4bit(struct mtd_info *mtd,
u32 syndrome[4];
u32 ecc_state;
unsigned num_errors, corrected;
- unsigned long timeo = jiffies + msecs_to_jiffies(100);
+ unsigned long timeo;
/* All bytes 0xff? It's an erased page; ignore its ECC. */
for (i = 0; i < 10; i++) {
@@ -373,6 +373,7 @@ compare:
* long as ECC_STATE reads less than 4. After that, ECC HW has entered
* correction state.
*/
+ timeo = jiffies + usecs_to_jiffies(100);
do {
ecc_state = (davinci_nand_readl(info,
NANDFSR_OFFSET) >> 8) & 0x0f;