diff options
author | Afzal Mohammed <afzal@ti.com> | 2012-10-05 11:43:19 +0530 |
---|---|---|
committer | Afzal Mohammed <afzal@ti.com> | 2012-10-15 14:42:01 +0530 |
commit | b7754452b3e27716347a528b47b0a1083af32520 (patch) | |
tree | a1c7a909131851fe69daae2abf15dcb18356831b /drivers/mtd | |
parent | eb77b6a78ac7f63985a3f592baf80ff33d213c48 (diff) | |
download | linux-3.10-b7754452b3e27716347a528b47b0a1083af32520.tar.gz linux-3.10-b7754452b3e27716347a528b47b0a1083af32520.tar.bz2 linux-3.10-b7754452b3e27716347a528b47b0a1083af32520.zip |
mtd: onenand: omap: use pdata info instead of cpu_is
platform data now contains a field to indicate whether
soc belongs to omap34xx family, use it instead of
cpu_is_* check.
This helps in removing dependency of platform specific
header file - cpu.h
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index d7ef2c947da..959f465a0aa 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -42,7 +42,6 @@ #include <asm/gpio.h> #include <plat/dma.h> -#include <plat/cpu.h> #define DRIVER_NAME "omap2-onenand" @@ -62,6 +61,7 @@ struct omap2_onenand { int freq; int (*setup)(void __iomem *base, int *freq_ptr); struct regulator *regulator; + u8 flags; }; static void omap2_onenand_dma_cb(int lch, u16 ch_status, void *data) @@ -154,7 +154,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) { syscfg |= ONENAND_SYS_CFG1_IOBE; write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); - if (cpu_is_omap34xx()) + if (c->flags & ONENAND_IN_OMAP34XX) /* Add a delay to let GPIO settle */ syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); } @@ -638,6 +638,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) init_completion(&c->irq_done); init_completion(&c->dma_done); + c->flags = pdata->flags; c->gpmc_cs = pdata->cs; c->gpio_irq = pdata->gpio_irq; c->dma_channel = pdata->dma_channel; @@ -728,7 +729,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) this = &c->onenand; if (c->dma_channel >= 0) { this->wait = omap2_onenand_wait; - if (cpu_is_omap34xx()) { + if (c->flags & ONENAND_IN_OMAP34XX) { this->read_bufferram = omap3_onenand_read_bufferram; this->write_bufferram = omap3_onenand_write_bufferram; } else { |