Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: onenand: omap2: Do not make delay for GPIO OMAP3 specific

Second commit in driver history (782b7a367d81: "[MTD] [OneNAND] OMAP3:
add delay for GPIO") added quirk for waiting until GPIO line settle.
As DMA was disabled for OMAP2 boards, chances are this problem was
not OMAP3 specific and as it is just one register read, previous
test for SoC type is approximately as expensive as read itself.
Make delay unconditional, which allows removing SoC specific code
alltogether.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Roger Quadros <rogerq@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

authored by

Ladislav Michl and committed by
Boris Brezillon
f5229331 3ed6a4d1

+2 -5
+2 -5
drivers/mtd/onenand/omap2.c
··· 57 57 struct dma_chan *dma_chan; 58 58 int freq; 59 59 int (*setup)(void __iomem *base, int *freq_ptr); 60 - u8 flags; 61 60 }; 62 61 63 62 static void omap2_onenand_dma_complete_func(void *completion) ··· 147 148 if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) { 148 149 syscfg |= ONENAND_SYS_CFG1_IOBE; 149 150 write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); 150 - if (c->flags & ONENAND_IN_OMAP34XX) 151 - /* Add a delay to let GPIO settle */ 152 - syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); 151 + /* Add a delay to let GPIO settle */ 152 + syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); 153 153 } 154 154 155 155 reinit_completion(&c->irq_done); ··· 468 470 469 471 init_completion(&c->irq_done); 470 472 init_completion(&c->dma_done); 471 - c->flags = pdata->flags; 472 473 c->gpmc_cs = pdata->cs; 473 474 c->gpio_irq = pdata->gpio_irq; 474 475 if (pdata->dma_channel < 0) {