aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand/omap2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/onenand/omap2.c')
-rw-r--r--drivers/mtd/onenand/omap2.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index e39b21d3e168..d1e0b8e7224b 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -32,19 +32,18 @@
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/interrupt.h> 33#include <linux/interrupt.h>
34#include <linux/delay.h> 34#include <linux/delay.h>
35#include <linux/dma-mapping.h>
36#include <linux/io.h>
35 37
36#include <asm/io.h>
37#include <asm/mach/flash.h> 38#include <asm/mach/flash.h>
38#include <asm/arch/gpmc.h> 39#include <mach/gpmc.h>
39#include <asm/arch/onenand.h> 40#include <mach/onenand.h>
40#include <asm/arch/gpio.h> 41#include <mach/gpio.h>
41#include <asm/arch/pm.h> 42#include <mach/pm.h>
42 43
43#include <linux/dma-mapping.h> 44#include <mach/dma.h>
44#include <asm/dma-mapping.h>
45#include <asm/arch/dma.h>
46 45
47#include <asm/arch/board.h> 46#include <mach/board.h>
48 47
49#define DRIVER_NAME "omap2-onenand" 48#define DRIVER_NAME "omap2-onenand"
50 49
@@ -150,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
150 149
151 INIT_COMPLETION(c->irq_done); 150 INIT_COMPLETION(c->irq_done);
152 if (c->gpio_irq) { 151 if (c->gpio_irq) {
153 result = omap_get_gpio_datain(c->gpio_irq); 152 result = gpio_get_value(c->gpio_irq);
154 if (result == -1) { 153 if (result == -1) {
155 ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS); 154 ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
156 intr = read_reg(c, ONENAND_REG_INTERRUPT); 155 intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -635,9 +634,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
635 "OneNAND\n", c->gpio_irq); 634 "OneNAND\n", c->gpio_irq);
636 goto err_iounmap; 635 goto err_iounmap;
637 } 636 }
638 omap_set_gpio_direction(c->gpio_irq, 1); 637 gpio_direction_input(c->gpio_irq);
639 638
640 if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq), 639 if ((r = request_irq(gpio_to_irq(c->gpio_irq),
641 omap2_onenand_interrupt, IRQF_TRIGGER_RISING, 640 omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
642 pdev->dev.driver->name, c)) < 0) 641 pdev->dev.driver->name, c)) < 0)
643 goto err_release_gpio; 642 goto err_release_gpio;
@@ -724,7 +723,7 @@ err_release_dma:
724 if (c->dma_channel != -1) 723 if (c->dma_channel != -1)
725 omap_free_dma(c->dma_channel); 724 omap_free_dma(c->dma_channel);
726 if (c->gpio_irq) 725 if (c->gpio_irq)
727 free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c); 726 free_irq(gpio_to_irq(c->gpio_irq), c);
728err_release_gpio: 727err_release_gpio:
729 if (c->gpio_irq) 728 if (c->gpio_irq)
730 omap_free_gpio(c->gpio_irq); 729 omap_free_gpio(c->gpio_irq);
@@ -761,7 +760,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
761 omap2_onenand_shutdown(pdev); 760 omap2_onenand_shutdown(pdev);
762 platform_set_drvdata(pdev, NULL); 761 platform_set_drvdata(pdev, NULL);
763 if (c->gpio_irq) { 762 if (c->gpio_irq) {
764 free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c); 763 free_irq(gpio_to_irq(c->gpio_irq), c);
765 omap_free_gpio(c->gpio_irq); 764 omap_free_gpio(c->gpio_irq);
766 } 765 }
767 iounmap(c->onenand.base); 766 iounmap(c->onenand.base);