Skip to content

Commit

Permalink
[MTD] [OneNAND] OMAP3: add delay for GPIO
Browse files Browse the repository at this point in the history
On OMAP3, the driver was occasionally not seeing the GPIO
interrupt.  Adding a small delay of one register read
eliminates the problem.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Adrian Hunter authored and David Woodhouse committed Aug 15, 2008
1 parent bde86fe commit 782b7a3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/mtd/onenand/omap2.c
Original file line number Diff line number Diff line change
@@ -141,8 +141,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)

/* Turn interrupts on */
syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
syscfg |= ONENAND_SYS_CFG1_IOBE;
write_reg(c, syscfg, ONENAND_REG_SYS_CFG1);
if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) {
syscfg |= ONENAND_SYS_CFG1_IOBE;
write_reg(c, syscfg, ONENAND_REG_SYS_CFG1);
if (cpu_is_omap34xx())
/* Add a delay to let GPIO settle */
syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
}

INIT_COMPLETION(c->irq_done);
if (c->gpio_irq) {

0 comments on commit 782b7a3

Please sign in to comment.