aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/omap2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index d7ef2c947daa..959f465a0aa1 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -42,7 +42,6 @@
42#include <asm/gpio.h> 42#include <asm/gpio.h>
43 43
44#include <plat/dma.h> 44#include <plat/dma.h>
45#include <plat/cpu.h>
46 45
47#define DRIVER_NAME "omap2-onenand" 46#define DRIVER_NAME "omap2-onenand"
48 47
@@ -62,6 +61,7 @@ struct omap2_onenand {
62 int freq; 61 int freq;
63 int (*setup)(void __iomem *base, int *freq_ptr); 62 int (*setup)(void __iomem *base, int *freq_ptr);
64 struct regulator *regulator; 63 struct regulator *regulator;
64 u8 flags;
65}; 65};
66 66
67static void omap2_onenand_dma_cb(int lch, u16 ch_status, void *data) 67static 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)
154 if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) { 154 if (!(syscfg & ONENAND_SYS_CFG1_IOBE)) {
155 syscfg |= ONENAND_SYS_CFG1_IOBE; 155 syscfg |= ONENAND_SYS_CFG1_IOBE;
156 write_reg(c, syscfg, ONENAND_REG_SYS_CFG1); 156 write_reg(c, syscfg, ONENAND_REG_SYS_CFG1);
157 if (cpu_is_omap34xx()) 157 if (c->flags & ONENAND_IN_OMAP34XX)
158 /* Add a delay to let GPIO settle */ 158 /* Add a delay to let GPIO settle */
159 syscfg = read_reg(c, ONENAND_REG_SYS_CFG1); 159 syscfg = read_reg(c, ONENAND_REG_SYS_CFG1);
160 } 160 }
@@ -638,6 +638,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
638 638
639 init_completion(&c->irq_done); 639 init_completion(&c->irq_done);
640 init_completion(&c->dma_done); 640 init_completion(&c->dma_done);
641 c->flags = pdata->flags;
641 c->gpmc_cs = pdata->cs; 642 c->gpmc_cs = pdata->cs;
642 c->gpio_irq = pdata->gpio_irq; 643 c->gpio_irq = pdata->gpio_irq;
643 c->dma_channel = pdata->dma_channel; 644 c->dma_channel = pdata->dma_channel;
@@ -728,7 +729,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
728 this = &c->onenand; 729 this = &c->onenand;
729 if (c->dma_channel >= 0) { 730 if (c->dma_channel >= 0) {
730 this->wait = omap2_onenand_wait; 731 this->wait = omap2_onenand_wait;
731 if (cpu_is_omap34xx()) { 732 if (c->flags & ONENAND_IN_OMAP34XX) {
732 this->read_bufferram = omap3_onenand_read_bufferram; 733 this->read_bufferram = omap3_onenand_read_bufferram;
733 this->write_bufferram = omap3_onenand_write_bufferram; 734 this->write_bufferram = omap3_onenand_write_bufferram;
734 } else { 735 } else {