diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2008-08-14 07:00:12 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-08-14 20:25:30 -0400 |
commit | 782b7a367d81da005d93b28cb00f9ae086773c24 (patch) | |
tree | 79d42e09cb7c891f98131798bfee8e7959ea97ad /drivers/mtd | |
parent | bde86fec7c822b6009d3cfefc20b76b8d34716af (diff) |
[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: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 40153ace5df6..34b42533f4bb 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -141,8 +141,13 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) | |||
141 | 141 | ||
142 | /* Turn interrupts on */ | 142 | /* Turn interrupts on */ |
143 | syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); | 143 | syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); |
144 | syscfg |= ONENAND_SYS_CFG1_IOBE; | 144 | if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) { |
145 | write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); | 145 | syscfg |= ONENAND_SYS_CFG1_IOBE; |
146 | write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); | ||
147 | if (cpu_is_omap34xx()) | ||
148 | /* Add a delay to let GPIO settle */ | ||
149 | syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); | ||
150 | } | ||
146 | 151 | ||
147 | INIT_COMPLETION(c->irq_done); | 152 | INIT_COMPLETION(c->irq_done); |
148 | if (c->gpio_irq) { | 153 | if (c->gpio_irq) { |