Skip to content

Commit f522933

Browse files
3x380VBoris Brezillon
authored andcommitted
mtd: onenand: omap2: Do not make delay for GPIO OMAP3 specific
Second commit in driver history (782b7a3: "[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>
1 parent 3ed6a4d commit f522933

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/mtd/onenand/omap2.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct omap2_onenand {
5757
struct dma_chan *dma_chan;
5858
int freq;
5959
int (*setup)(void __iomem *base, int *freq_ptr);
60-
u8 flags;
6160
};
6261

6362
static void omap2_onenand_dma_complete_func(void *completion)
@@ -148,9 +147,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
148147
if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) {
149148
syscfg |= ONENAND_SYS_CFG1_IOBE;
150149
write_reg(c, syscfg, ONENAND_REG_SYS_CFG1);
151-
if (c->flags & ONENAND_IN_OMAP34XX)
152-
/* Add a delay to let GPIO settle */
153-
syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
150+
/* Add a delay to let GPIO settle */
151+
syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
154152
}
155153

156154
reinit_completion(&c->irq_done);
@@ -470,7 +468,6 @@ static int omap2_onenand_probe(struct platform_device *pdev)
470468

471469
init_completion(&c->irq_done);
472470
init_completion(&c->dma_done);
473-
c->flags = pdata->flags;
474471
c->gpmc_cs = pdata->cs;
475472
c->gpio_irq = pdata->gpio_irq;
476473
if (pdata->dma_channel < 0) {

0 commit comments

Comments
 (0)