Commit 782b7a36 authored by Adrian Hunter's avatar Adrian Hunter Committed by David Woodhouse

[MTD] [OneNAND] OMAP3: add delay for GPIO

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: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent bde86fec
...@@ -141,8 +141,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) ...@@ -141,8 +141,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
/* Turn interrupts on */ /* Turn interrupts on */
syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
syscfg |= ONENAND_SYS_CFG1_IOBE; if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) {
write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); 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); INIT_COMPLETION(c->irq_done);
if (c->gpio_irq) { if (c->gpio_irq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment