Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bdb053a authored by Wolfram Sang's avatar Wolfram Sang Committed by David Woodhouse
Browse files

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: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent f2df1ae3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 @@ static int nand_davinci_correct_4bit(struct mtd_info *mtd,
	 * 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;