public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP2 OneNAND GPIO fix
@ 2008-12-11 16:59 Jean Pihet
  2008-12-15 23:40 ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Pihet @ 2008-12-11 16:59 UTC (permalink / raw)
  To: linux-omap

[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]

Hi,

Here is a patch to have the OMAP2 OneNAND driver compile on the latest tree.
I do not know if this has been addressed already, here is a patch.

Regards,
Jean



From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
From: Jean Pihet <jpihet@mvista.com>
Date: Thu, 11 Dec 2008 17:48:31 +0100
Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver

This patch replaces some legacy OMAP GPIO calls with the standard
calls that work on most platforms.

Tested on OMAP3 EVM board.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 762623f..f223303 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -34,11 +34,11 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/gpio.h>

 #include <asm/mach/flash.h>
 #include <mach/gpmc.h>
 #include <mach/onenand.h>
-#include <mach/gpio.h>
 #include <mach/pm.h>

 #include <mach/dma.h>
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int 
state)

                INIT_COMPLETION(c->irq_done);
                if (c->gpio_irq) {
-                       result = omap_get_gpio_datain(c->gpio_irq);
+                       result = gpio_get_value(c->gpio_irq);
                        if (result == -1) {
                                ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
                                intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct 
platform_device *pdev)
        }

        if (c->gpio_irq) {
-               if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+               r = gpio_request(c->gpio_irq, "OneNAND Irq");
+               if (r < 0) {
                        dev_err(&pdev->dev,  "Failed to request GPIO%d for "
                                "OneNAND\n", c->gpio_irq);
                        goto err_iounmap;
        }
-       omap_set_gpio_direction(c->gpio_irq, 1);
+       gpio_direction_input(c->gpio_irq);

        if ((r = request_irq(gpio_to_irq(c->gpio_irq),
                             omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
@@ -726,7 +727,7 @@ err_release_dma:
                free_irq(gpio_to_irq(c->gpio_irq), c);
 err_release_gpio:
        if (c->gpio_irq)
-               omap_free_gpio(c->gpio_irq);
+               gpio_free(c->gpio_irq);
 err_iounmap:
        iounmap(c->onenand.base);
 err_release_mem_region:
@@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct 
platform_device *pdev)
        platform_set_drvdata(pdev, NULL);
        if (c->gpio_irq) {
                free_irq(gpio_to_irq(c->gpio_irq), c);
-               omap_free_gpio(c->gpio_irq);
+               gpio_free(c->gpio_irq);
        }
        iounmap(c->onenand.base);
        release_mem_region(c->phys_base, ONENAND_IO_SIZE);
--
1.5.4.4.21.gc4a6c

[-- Attachment #2: ARM-OMAP-use-GPIO-standard-in-OneNAND-driver.patch --]
[-- Type: text/x-diff, Size: 2508 bytes --]

From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
From: Jean Pihet <jpihet@mvista.com>
Date: Thu, 11 Dec 2008 17:48:31 +0100
Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver

This patch replaces some legacy OMAP GPIO calls with the standard
calls that work on most platforms.

Tested on OMAP3 EVM board.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 762623f..f223303 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -34,11 +34,11 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/gpio.h>
 
 #include <asm/mach/flash.h>
 #include <mach/gpmc.h>
 #include <mach/onenand.h>
-#include <mach/gpio.h>
 #include <mach/pm.h>
 
 #include <mach/dma.h>
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
 
 		INIT_COMPLETION(c->irq_done);
 		if (c->gpio_irq) {
-			result = omap_get_gpio_datain(c->gpio_irq);
+			result = gpio_get_value(c->gpio_irq);
 			if (result == -1) {
 				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
 				intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
 	}
 
 	if (c->gpio_irq) {
-		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+		r = gpio_request(c->gpio_irq, "OneNAND Irq");
+		if (r < 0) {
 			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
 				"OneNAND\n", c->gpio_irq);
 			goto err_iounmap;
 	}
-	omap_set_gpio_direction(c->gpio_irq, 1);
+	gpio_direction_input(c->gpio_irq);
 
 	if ((r = request_irq(gpio_to_irq(c->gpio_irq),
 			     omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
@@ -726,7 +727,7 @@ err_release_dma:
 		free_irq(gpio_to_irq(c->gpio_irq), c);
 err_release_gpio:
 	if (c->gpio_irq)
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 err_iounmap:
 	iounmap(c->onenand.base);
 err_release_mem_region:
@@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
 	platform_set_drvdata(pdev, NULL);
 	if (c->gpio_irq) {
 		free_irq(gpio_to_irq(c->gpio_irq), c);
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 	}
 	iounmap(c->onenand.base);
 	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
-- 
1.5.4.4.21.gc4a6c


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-11 16:59 [PATCH] OMAP2 OneNAND GPIO fix Jean Pihet
@ 2008-12-15 23:40 ` Tony Lindgren
  2008-12-16  8:19   ` Jean Pihet
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2008-12-15 23:40 UTC (permalink / raw)
  To: Jean Pihet; +Cc: linux-omap

* Jean Pihet <jpihet@mvista.com> [081211 09:02]:
> Hi,
> 
> Here is a patch to have the OMAP2 OneNAND driver compile on the latest tree.
> I do not know if this has been addressed already, here is a patch.

Looks like I already applied similar fixes. These are queued up for
mainline too BTW.

Regards,

Tony

> 
> Regards,
> Jean
> 
> 
> 
> From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
> From: Jean Pihet <jpihet@mvista.com>
> Date: Thu, 11 Dec 2008 17:48:31 +0100
> Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> 
> This patch replaces some legacy OMAP GPIO calls with the standard
> calls that work on most platforms.
> 
> Tested on OMAP3 EVM board.
> 
> Signed-off-by: Jean Pihet <jpihet@mvista.com>
> ---
>  drivers/mtd/onenand/omap2.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index 762623f..f223303 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -34,11 +34,11 @@
>  #include <linux/delay.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/io.h>
> +#include <linux/gpio.h>
> 
>  #include <asm/mach/flash.h>
>  #include <mach/gpmc.h>
>  #include <mach/onenand.h>
> -#include <mach/gpio.h>
>  #include <mach/pm.h>
> 
>  #include <mach/dma.h>
> @@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int 
> state)
> 
>                 INIT_COMPLETION(c->irq_done);
>                 if (c->gpio_irq) {
> -                       result = omap_get_gpio_datain(c->gpio_irq);
> +                       result = gpio_get_value(c->gpio_irq);
>                         if (result == -1) {
>                                 ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
>                                 intr = read_reg(c, ONENAND_REG_INTERRUPT);
> @@ -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct 
> platform_device *pdev)
>         }
> 
>         if (c->gpio_irq) {
> -               if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> +               r = gpio_request(c->gpio_irq, "OneNAND Irq");
> +               if (r < 0) {
>                         dev_err(&pdev->dev,  "Failed to request GPIO%d for "
>                                 "OneNAND\n", c->gpio_irq);
>                         goto err_iounmap;
>         }
> -       omap_set_gpio_direction(c->gpio_irq, 1);
> +       gpio_direction_input(c->gpio_irq);
> 
>         if ((r = request_irq(gpio_to_irq(c->gpio_irq),
>                              omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
> @@ -726,7 +727,7 @@ err_release_dma:
>                 free_irq(gpio_to_irq(c->gpio_irq), c);
>  err_release_gpio:
>         if (c->gpio_irq)
> -               omap_free_gpio(c->gpio_irq);
> +               gpio_free(c->gpio_irq);
>  err_iounmap:
>         iounmap(c->onenand.base);
>  err_release_mem_region:
> @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct 
> platform_device *pdev)
>         platform_set_drvdata(pdev, NULL);
>         if (c->gpio_irq) {
>                 free_irq(gpio_to_irq(c->gpio_irq), c);
> -               omap_free_gpio(c->gpio_irq);
> +               gpio_free(c->gpio_irq);
>         }
>         iounmap(c->onenand.base);
>         release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> --
> 1.5.4.4.21.gc4a6c

> From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
> From: Jean Pihet <jpihet@mvista.com>
> Date: Thu, 11 Dec 2008 17:48:31 +0100
> Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> 
> This patch replaces some legacy OMAP GPIO calls with the standard
> calls that work on most platforms.
> 
> Tested on OMAP3 EVM board.
> 
> Signed-off-by: Jean Pihet <jpihet@mvista.com>
> ---
>  drivers/mtd/onenand/omap2.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index 762623f..f223303 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -34,11 +34,11 @@
>  #include <linux/delay.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/io.h>
> +#include <linux/gpio.h>
>  
>  #include <asm/mach/flash.h>
>  #include <mach/gpmc.h>
>  #include <mach/onenand.h>
> -#include <mach/gpio.h>
>  #include <mach/pm.h>
>  
>  #include <mach/dma.h>
> @@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
>  
>  		INIT_COMPLETION(c->irq_done);
>  		if (c->gpio_irq) {
> -			result = omap_get_gpio_datain(c->gpio_irq);
> +			result = gpio_get_value(c->gpio_irq);
>  			if (result == -1) {
>  				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
>  				intr = read_reg(c, ONENAND_REG_INTERRUPT);
> @@ -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
>  	}
>  
>  	if (c->gpio_irq) {
> -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> +		if (r < 0) {
>  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
>  				"OneNAND\n", c->gpio_irq);
>  			goto err_iounmap;
>  	}
> -	omap_set_gpio_direction(c->gpio_irq, 1);
> +	gpio_direction_input(c->gpio_irq);
>  
>  	if ((r = request_irq(gpio_to_irq(c->gpio_irq),
>  			     omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
> @@ -726,7 +727,7 @@ err_release_dma:
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
>  err_release_gpio:
>  	if (c->gpio_irq)
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  err_iounmap:
>  	iounmap(c->onenand.base);
>  err_release_mem_region:
> @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, NULL);
>  	if (c->gpio_irq) {
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  	}
>  	iounmap(c->onenand.base);
>  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> -- 
> 1.5.4.4.21.gc4a6c
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-15 23:40 ` Tony Lindgren
@ 2008-12-16  8:19   ` Jean Pihet
  2008-12-16  8:39     ` Jarkko Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Pihet @ 2008-12-16  8:19 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
> * Jean Pihet <jpihet@mvista.com> [081211 09:02]:
> > Hi,
> >
> > Here is a patch to have the OMAP2 OneNAND driver compile on the latest
> > tree. I do not know if this has been addressed already, here is a patch.
>
> Looks like I already applied similar fixes. These are queued up for
> mainline too BTW.
Ok. My patch also changes the request and free omap calls to the standard 
version. I can generate a new patch if needed.

Regards,
Jean.

>
> Regards,
>
> Tony
>
> > Regards,
> > Jean
> >
> >
> >
> > From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
> > From: Jean Pihet <jpihet@mvista.com>
> > Date: Thu, 11 Dec 2008 17:48:31 +0100
> > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> >
> > This patch replaces some legacy OMAP GPIO calls with the standard
> > calls that work on most platforms.
> >
> > Tested on OMAP3 EVM board.
> >
> > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > ---
> >  drivers/mtd/onenand/omap2.c |   13 +++++++------
> >  1 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > index 762623f..f223303 100644
> > --- a/drivers/mtd/onenand/omap2.c
> > +++ b/drivers/mtd/onenand/omap2.c
> > @@ -34,11 +34,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/dma-mapping.h>
> >  #include <linux/io.h>
> > +#include <linux/gpio.h>
> >
> >  #include <asm/mach/flash.h>
> >  #include <mach/gpmc.h>
> >  #include <mach/onenand.h>
> > -#include <mach/gpio.h>
> >  #include <mach/pm.h>
> >
> >  #include <mach/dma.h>
> > @@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd,
> > int state)
> >
> >                 INIT_COMPLETION(c->irq_done);
> >                 if (c->gpio_irq) {
> > -                       result = omap_get_gpio_datain(c->gpio_irq);
> > +                       result = gpio_get_value(c->gpio_irq);
> >                         if (result == -1) {
> >                                 ctrl = read_reg(c,
> > ONENAND_REG_CTRL_STATUS); intr = read_reg(c, ONENAND_REG_INTERRUPT); @@
> > -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct
> > platform_device *pdev)
> >         }
> >
> >         if (c->gpio_irq) {
> > -               if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > +               r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > +               if (r < 0) {
> >                         dev_err(&pdev->dev,  "Failed to request GPIO%d
> > for " "OneNAND\n", c->gpio_irq);
> >                         goto err_iounmap;
> >         }
> > -       omap_set_gpio_direction(c->gpio_irq, 1);
> > +       gpio_direction_input(c->gpio_irq);
> >
> >         if ((r = request_irq(gpio_to_irq(c->gpio_irq),
> >                              omap2_onenand_interrupt,
> > IRQF_TRIGGER_RISING, @@ -726,7 +727,7 @@ err_release_dma:
> >                 free_irq(gpio_to_irq(c->gpio_irq), c);
> >  err_release_gpio:
> >         if (c->gpio_irq)
> > -               omap_free_gpio(c->gpio_irq);
> > +               gpio_free(c->gpio_irq);
> >  err_iounmap:
> >         iounmap(c->onenand.base);
> >  err_release_mem_region:
> > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > platform_device *pdev)
> >         platform_set_drvdata(pdev, NULL);
> >         if (c->gpio_irq) {
> >                 free_irq(gpio_to_irq(c->gpio_irq), c);
> > -               omap_free_gpio(c->gpio_irq);
> > +               gpio_free(c->gpio_irq);
> >         }
> >         iounmap(c->onenand.base);
> >         release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > --
> > 1.5.4.4.21.gc4a6c
> >
> > From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
> > From: Jean Pihet <jpihet@mvista.com>
> > Date: Thu, 11 Dec 2008 17:48:31 +0100
> > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> >
> > This patch replaces some legacy OMAP GPIO calls with the standard
> > calls that work on most platforms.
> >
> > Tested on OMAP3 EVM board.
> >
> > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > ---
> >  drivers/mtd/onenand/omap2.c |   13 +++++++------
> >  1 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > index 762623f..f223303 100644
> > --- a/drivers/mtd/onenand/omap2.c
> > +++ b/drivers/mtd/onenand/omap2.c
> > @@ -34,11 +34,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/dma-mapping.h>
> >  #include <linux/io.h>
> > +#include <linux/gpio.h>
> >
> >  #include <asm/mach/flash.h>
> >  #include <mach/gpmc.h>
> >  #include <mach/onenand.h>
> > -#include <mach/gpio.h>
> >  #include <mach/pm.h>
> >
> >  #include <mach/dma.h>
> > @@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd,
> > int state)
> >
> >  		INIT_COMPLETION(c->irq_done);
> >  		if (c->gpio_irq) {
> > -			result = omap_get_gpio_datain(c->gpio_irq);
> > +			result = gpio_get_value(c->gpio_irq);
> >  			if (result == -1) {
> >  				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
> >  				intr = read_reg(c, ONENAND_REG_INTERRUPT);
> > @@ -629,12 +629,13 @@ static int __devinit omap2_onenand_probe(struct
> > platform_device *pdev) }
> >
> >  	if (c->gpio_irq) {
> > -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > +		if (r < 0) {
> >  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
> >  				"OneNAND\n", c->gpio_irq);
> >  			goto err_iounmap;
> >  	}
> > -	omap_set_gpio_direction(c->gpio_irq, 1);
> > +	gpio_direction_input(c->gpio_irq);
> >
> >  	if ((r = request_irq(gpio_to_irq(c->gpio_irq),
> >  			     omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
> > @@ -726,7 +727,7 @@ err_release_dma:
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> >  err_release_gpio:
> >  	if (c->gpio_irq)
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  err_iounmap:
> >  	iounmap(c->onenand.base);
> >  err_release_mem_region:
> > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > platform_device *pdev) platform_set_drvdata(pdev, NULL);
> >  	if (c->gpio_irq) {
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  	}
> >  	iounmap(c->onenand.base);
> >  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > --
> > 1.5.4.4.21.gc4a6c



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-16  8:19   ` Jean Pihet
@ 2008-12-16  8:39     ` Jarkko Nikula
  2008-12-16 16:37       ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Jarkko Nikula @ 2008-12-16  8:39 UTC (permalink / raw)
  To: ext Jean Pihet; +Cc: Tony Lindgren, linux-omap

On Tue, 16 Dec 2008 09:19:24 +0100
"ext Jean Pihet" <jpihet@mvista.com> wrote:

> On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
> > * Jean Pihet <jpihet@mvista.com> [081211 09:02]:
> > > Hi,
> > >
> > > Here is a patch to have the OMAP2 OneNAND driver compile on the latest
> > > tree. I do not know if this has been addressed already, here is a patch.
> >
> > Looks like I already applied similar fixes. These are queued up for
> > mainline too BTW.
> Ok. My patch also changes the request and free omap calls to the standard 
> version. I can generate a new patch if needed.
> 
IRCC gpiolib conversion patches are already going. Tony?


Jarkko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-16  8:39     ` Jarkko Nikula
@ 2008-12-16 16:37       ` Tony Lindgren
  2008-12-16 18:28         ` Jean Pihet
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2008-12-16 16:37 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: ext Jean Pihet, linux-omap

* Jarkko Nikula <jarkko.nikula@nokia.com> [081216 00:39]:
> On Tue, 16 Dec 2008 09:19:24 +0100
> "ext Jean Pihet" <jpihet@mvista.com> wrote:
> 
> > On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
> > > * Jean Pihet <jpihet@mvista.com> [081211 09:02]:
> > > > Hi,
> > > >
> > > > Here is a patch to have the OMAP2 OneNAND driver compile on the latest
> > > > tree. I do not know if this has been addressed already, here is a patch.
> > >
> > > Looks like I already applied similar fixes. These are queued up for
> > > mainline too BTW.
> > Ok. My patch also changes the request and free omap calls to the standard 
> > version. I can generate a new patch if needed.
> > 
> IRCC gpiolib conversion patches are already going. Tony?

Yeah, should be about to get pulled into Russell's queue, also
available here:

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=shortlog;h=hsmmc-init

So Jean, if you can check what still needs to be patched there, and
we can queue it via omap-fixes.

Regards,

Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-16 16:37       ` Tony Lindgren
@ 2008-12-16 18:28         ` Jean Pihet
  2009-01-08 12:10           ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Pihet @ 2008-12-16 18:28 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]

Tony,

> Yeah, should be about to get pulled into Russell's queue, also
> available here:
>
> http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=short
>log;h=hsmmc-init
>
> So Jean, if you can check what still needs to be patched there, and
> we can queue it via omap-fixes.
Here is the patch against the hsmmc-init branch.
The patch changes the include path and the request/free free omap calls to the
standard version.

Regards,
Jean.

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <jpihet@mvista.com>
Date: Tue, 16 Dec 2008 19:22:45 +0100
Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver

This patch replaces some legacy OMAP GPIO calls with the standard
calls.

Tested on OMAP3 EVM board.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index d1e0b8e..f223303 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -34,11 +34,11 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/gpio.h>
 
 #include <asm/mach/flash.h>
 #include <mach/gpmc.h>
 #include <mach/onenand.h>
-#include <mach/gpio.h>
 #include <mach/pm.h>
 
 #include <mach/dma.h>
@@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct 
platform_device *pdev)
 	}
 
 	if (c->gpio_irq) {
-		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+		r = gpio_request(c->gpio_irq, "OneNAND Irq");
+		if (r < 0) {
 			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
 				"OneNAND\n", c->gpio_irq);
 			goto err_iounmap;
@@ -726,7 +727,7 @@ err_release_dma:
 		free_irq(gpio_to_irq(c->gpio_irq), c);
 err_release_gpio:
 	if (c->gpio_irq)
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 err_iounmap:
 	iounmap(c->onenand.base);
 err_release_mem_region:
@@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct 
platform_device *pdev)
 	platform_set_drvdata(pdev, NULL);
 	if (c->gpio_irq) {
 		free_irq(gpio_to_irq(c->gpio_irq), c);
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 	}
 	iounmap(c->onenand.base);
 	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
-- 
1.5.4.4.21.gc4a6c

[-- Attachment #2: ARM-OMAP-use-GPIO-standard-in-OneNAND-driver.patch --]
[-- Type: text/x-diff, Size: 1917 bytes --]

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <jpihet@mvista.com>
Date: Tue, 16 Dec 2008 19:22:45 +0100
Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver

This patch replaces some legacy OMAP GPIO calls with the standard
calls.

Tested on OMAP3 EVM board.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index d1e0b8e..f223303 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -34,11 +34,11 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/gpio.h>
 
 #include <asm/mach/flash.h>
 #include <mach/gpmc.h>
 #include <mach/onenand.h>
-#include <mach/gpio.h>
 #include <mach/pm.h>
 
 #include <mach/dma.h>
@@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
 	}
 
 	if (c->gpio_irq) {
-		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+		r = gpio_request(c->gpio_irq, "OneNAND Irq");
+		if (r < 0) {
 			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
 				"OneNAND\n", c->gpio_irq);
 			goto err_iounmap;
@@ -726,7 +727,7 @@ err_release_dma:
 		free_irq(gpio_to_irq(c->gpio_irq), c);
 err_release_gpio:
 	if (c->gpio_irq)
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 err_iounmap:
 	iounmap(c->onenand.base);
 err_release_mem_region:
@@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
 	platform_set_drvdata(pdev, NULL);
 	if (c->gpio_irq) {
 		free_irq(gpio_to_irq(c->gpio_irq), c);
-		omap_free_gpio(c->gpio_irq);
+		gpio_free(c->gpio_irq);
 	}
 	iounmap(c->onenand.base);
 	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
-- 
1.5.4.4.21.gc4a6c


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2008-12-16 18:28         ` Jean Pihet
@ 2009-01-08 12:10           ` Tony Lindgren
  2009-01-08 12:56             ` Jean Pihet
  0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2009-01-08 12:10 UTC (permalink / raw)
  To: Jean Pihet; +Cc: linux-omap

* Jean Pihet <jpihet@mvista.com> [081216 20:29]:
> Tony,
> 
> > Yeah, should be about to get pulled into Russell's queue, also
> > available here:
> >
> > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=short
> >log;h=hsmmc-init
> >
> > So Jean, if you can check what still needs to be patched there, and
> > we can queue it via omap-fixes.
> Here is the patch against the hsmmc-init branch.
> The patch changes the include path and the request/free free omap calls to the
> standard version.

Oops, I should have used this patch instead yesterday.. We could add
your changes as a clean-up patch later on though once the currently
pending stuff gets into mainline. Maybe refresh and resubmit then?

Thanks,

Tony

> 
> Regards,
> Jean.
> 
> From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> From: Jean Pihet <jpihet@mvista.com>
> Date: Tue, 16 Dec 2008 19:22:45 +0100
> Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> 
> This patch replaces some legacy OMAP GPIO calls with the standard
> calls.
> 
> Tested on OMAP3 EVM board.
> 
> Signed-off-by: Jean Pihet <jpihet@mvista.com>
> ---
>  drivers/mtd/onenand/omap2.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index d1e0b8e..f223303 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -34,11 +34,11 @@
>  #include <linux/delay.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/io.h>
> +#include <linux/gpio.h>
>  
>  #include <asm/mach/flash.h>
>  #include <mach/gpmc.h>
>  #include <mach/onenand.h>
> -#include <mach/gpio.h>
>  #include <mach/pm.h>
>  
>  #include <mach/dma.h>
> @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct 
> platform_device *pdev)
>  	}
>  
>  	if (c->gpio_irq) {
> -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> +		if (r < 0) {
>  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
>  				"OneNAND\n", c->gpio_irq);
>  			goto err_iounmap;
> @@ -726,7 +727,7 @@ err_release_dma:
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
>  err_release_gpio:
>  	if (c->gpio_irq)
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  err_iounmap:
>  	iounmap(c->onenand.base);
>  err_release_mem_region:
> @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct 
> platform_device *pdev)
>  	platform_set_drvdata(pdev, NULL);
>  	if (c->gpio_irq) {
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  	}
>  	iounmap(c->onenand.base);
>  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> -- 
> 1.5.4.4.21.gc4a6c

> From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> From: Jean Pihet <jpihet@mvista.com>
> Date: Tue, 16 Dec 2008 19:22:45 +0100
> Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> 
> This patch replaces some legacy OMAP GPIO calls with the standard
> calls.
> 
> Tested on OMAP3 EVM board.
> 
> Signed-off-by: Jean Pihet <jpihet@mvista.com>
> ---
>  drivers/mtd/onenand/omap2.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index d1e0b8e..f223303 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -34,11 +34,11 @@
>  #include <linux/delay.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/io.h>
> +#include <linux/gpio.h>
>  
>  #include <asm/mach/flash.h>
>  #include <mach/gpmc.h>
>  #include <mach/onenand.h>
> -#include <mach/gpio.h>
>  #include <mach/pm.h>
>  
>  #include <mach/dma.h>
> @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
>  	}
>  
>  	if (c->gpio_irq) {
> -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> +		if (r < 0) {
>  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
>  				"OneNAND\n", c->gpio_irq);
>  			goto err_iounmap;
> @@ -726,7 +727,7 @@ err_release_dma:
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
>  err_release_gpio:
>  	if (c->gpio_irq)
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  err_iounmap:
>  	iounmap(c->onenand.base);
>  err_release_mem_region:
> @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, NULL);
>  	if (c->gpio_irq) {
>  		free_irq(gpio_to_irq(c->gpio_irq), c);
> -		omap_free_gpio(c->gpio_irq);
> +		gpio_free(c->gpio_irq);
>  	}
>  	iounmap(c->onenand.base);
>  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> -- 
> 1.5.4.4.21.gc4a6c
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2009-01-08 12:10           ` Tony Lindgren
@ 2009-01-08 12:56             ` Jean Pihet
  2009-01-08 13:12               ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Pihet @ 2009-01-08 12:56 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

On Thursday 08 January 2009 13:10:37 Tony Lindgren wrote:
> * Jean Pihet <jpihet@mvista.com> [081216 20:29]:
> > Tony,
> >
> > > Yeah, should be about to get pulled into Russell's queue, also
> > > available here:
> > >
> > > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=s
> > >hort log;h=hsmmc-init
> > >
> > > So Jean, if you can check what still needs to be patched there, and
> > > we can queue it via omap-fixes.
> >
> > Here is the patch against the hsmmc-init branch.
> > The patch changes the include path and the request/free free omap calls
> > to the standard version.
>
> Oops, I should have used this patch instead yesterday.. We could add
> your changes as a clean-up patch later on though once the currently
> pending stuff gets into mainline. Maybe refresh and resubmit then?
Ok! When will it hit the mainline?

>
> Thanks,
>
> Tony
>
> > Regards,
> > Jean.
> >
> > From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> > From: Jean Pihet <jpihet@mvista.com>
> > Date: Tue, 16 Dec 2008 19:22:45 +0100
> > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> >
> > This patch replaces some legacy OMAP GPIO calls with the standard
> > calls.
> >
> > Tested on OMAP3 EVM board.
> >
> > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > ---
> >  drivers/mtd/onenand/omap2.c |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > index d1e0b8e..f223303 100644
> > --- a/drivers/mtd/onenand/omap2.c
> > +++ b/drivers/mtd/onenand/omap2.c
> > @@ -34,11 +34,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/dma-mapping.h>
> >  #include <linux/io.h>
> > +#include <linux/gpio.h>
> >
> >  #include <asm/mach/flash.h>
> >  #include <mach/gpmc.h>
> >  #include <mach/onenand.h>
> > -#include <mach/gpio.h>
> >  #include <mach/pm.h>
> >
> >  #include <mach/dma.h>
> > @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct
> > platform_device *pdev)
> >  	}
> >
> >  	if (c->gpio_irq) {
> > -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > +		if (r < 0) {
> >  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
> >  				"OneNAND\n", c->gpio_irq);
> >  			goto err_iounmap;
> > @@ -726,7 +727,7 @@ err_release_dma:
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> >  err_release_gpio:
> >  	if (c->gpio_irq)
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  err_iounmap:
> >  	iounmap(c->onenand.base);
> >  err_release_mem_region:
> > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > platform_device *pdev)
> >  	platform_set_drvdata(pdev, NULL);
> >  	if (c->gpio_irq) {
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  	}
> >  	iounmap(c->onenand.base);
> >  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > --
> > 1.5.4.4.21.gc4a6c
> >
> > From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> > From: Jean Pihet <jpihet@mvista.com>
> > Date: Tue, 16 Dec 2008 19:22:45 +0100
> > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> >
> > This patch replaces some legacy OMAP GPIO calls with the standard
> > calls.
> >
> > Tested on OMAP3 EVM board.
> >
> > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > ---
> >  drivers/mtd/onenand/omap2.c |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > index d1e0b8e..f223303 100644
> > --- a/drivers/mtd/onenand/omap2.c
> > +++ b/drivers/mtd/onenand/omap2.c
> > @@ -34,11 +34,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/dma-mapping.h>
> >  #include <linux/io.h>
> > +#include <linux/gpio.h>
> >
> >  #include <asm/mach/flash.h>
> >  #include <mach/gpmc.h>
> >  #include <mach/onenand.h>
> > -#include <mach/gpio.h>
> >  #include <mach/pm.h>
> >
> >  #include <mach/dma.h>
> > @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct
> > platform_device *pdev) }
> >
> >  	if (c->gpio_irq) {
> > -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > +		if (r < 0) {
> >  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
> >  				"OneNAND\n", c->gpio_irq);
> >  			goto err_iounmap;
> > @@ -726,7 +727,7 @@ err_release_dma:
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> >  err_release_gpio:
> >  	if (c->gpio_irq)
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  err_iounmap:
> >  	iounmap(c->onenand.base);
> >  err_release_mem_region:
> > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > platform_device *pdev) platform_set_drvdata(pdev, NULL);
> >  	if (c->gpio_irq) {
> >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > -		omap_free_gpio(c->gpio_irq);
> > +		gpio_free(c->gpio_irq);
> >  	}
> >  	iounmap(c->onenand.base);
> >  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > --
> > 1.5.4.4.21.gc4a6c



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] OMAP2 OneNAND GPIO fix
  2009-01-08 12:56             ` Jean Pihet
@ 2009-01-08 13:12               ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-01-08 13:12 UTC (permalink / raw)
  To: Jean Pihet; +Cc: linux-omap

* Jean Pihet <jpihet@mvista.com> [090108 14:57]:
> On Thursday 08 January 2009 13:10:37 Tony Lindgren wrote:
> > * Jean Pihet <jpihet@mvista.com> [081216 20:29]:
> > > Tony,
> > >
> > > > Yeah, should be about to get pulled into Russell's queue, also
> > > > available here:
> > > >
> > > > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=s
> > > >hort log;h=hsmmc-init
> > > >
> > > > So Jean, if you can check what still needs to be patched there, and
> > > > we can queue it via omap-fixes.
> > >
> > > Here is the patch against the hsmmc-init branch.
> > > The patch changes the include path and the request/free free omap calls
> > > to the standard version.
> >
> > Oops, I should have used this patch instead yesterday.. We could add
> > your changes as a clean-up patch later on though once the currently
> > pending stuff gets into mainline. Maybe refresh and resubmit then?
> Ok! When will it hit the mainline?

Hopefully within few days.

Tony


> 
> >
> > Thanks,
> >
> > Tony
> >
> > > Regards,
> > > Jean.
> > >
> > > From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> > > From: Jean Pihet <jpihet@mvista.com>
> > > Date: Tue, 16 Dec 2008 19:22:45 +0100
> > > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> > >
> > > This patch replaces some legacy OMAP GPIO calls with the standard
> > > calls.
> > >
> > > Tested on OMAP3 EVM board.
> > >
> > > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > > ---
> > >  drivers/mtd/onenand/omap2.c |    9 +++++----
> > >  1 files changed, 5 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > > index d1e0b8e..f223303 100644
> > > --- a/drivers/mtd/onenand/omap2.c
> > > +++ b/drivers/mtd/onenand/omap2.c
> > > @@ -34,11 +34,11 @@
> > >  #include <linux/delay.h>
> > >  #include <linux/dma-mapping.h>
> > >  #include <linux/io.h>
> > > +#include <linux/gpio.h>
> > >
> > >  #include <asm/mach/flash.h>
> > >  #include <mach/gpmc.h>
> > >  #include <mach/onenand.h>
> > > -#include <mach/gpio.h>
> > >  #include <mach/pm.h>
> > >
> > >  #include <mach/dma.h>
> > > @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct
> > > platform_device *pdev)
> > >  	}
> > >
> > >  	if (c->gpio_irq) {
> > > -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > > +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > > +		if (r < 0) {
> > >  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
> > >  				"OneNAND\n", c->gpio_irq);
> > >  			goto err_iounmap;
> > > @@ -726,7 +727,7 @@ err_release_dma:
> > >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > >  err_release_gpio:
> > >  	if (c->gpio_irq)
> > > -		omap_free_gpio(c->gpio_irq);
> > > +		gpio_free(c->gpio_irq);
> > >  err_iounmap:
> > >  	iounmap(c->onenand.base);
> > >  err_release_mem_region:
> > > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > > platform_device *pdev)
> > >  	platform_set_drvdata(pdev, NULL);
> > >  	if (c->gpio_irq) {
> > >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > > -		omap_free_gpio(c->gpio_irq);
> > > +		gpio_free(c->gpio_irq);
> > >  	}
> > >  	iounmap(c->onenand.base);
> > >  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > > --
> > > 1.5.4.4.21.gc4a6c
> > >
> > > From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
> > > From: Jean Pihet <jpihet@mvista.com>
> > > Date: Tue, 16 Dec 2008 19:22:45 +0100
> > > Subject: [PATCH] ARM: OMAP: use GPIO standard in OneNAND driver
> > >
> > > This patch replaces some legacy OMAP GPIO calls with the standard
> > > calls.
> > >
> > > Tested on OMAP3 EVM board.
> > >
> > > Signed-off-by: Jean Pihet <jpihet@mvista.com>
> > > ---
> > >  drivers/mtd/onenand/omap2.c |    9 +++++----
> > >  1 files changed, 5 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > > index d1e0b8e..f223303 100644
> > > --- a/drivers/mtd/onenand/omap2.c
> > > +++ b/drivers/mtd/onenand/omap2.c
> > > @@ -34,11 +34,11 @@
> > >  #include <linux/delay.h>
> > >  #include <linux/dma-mapping.h>
> > >  #include <linux/io.h>
> > > +#include <linux/gpio.h>
> > >
> > >  #include <asm/mach/flash.h>
> > >  #include <mach/gpmc.h>
> > >  #include <mach/onenand.h>
> > > -#include <mach/gpio.h>
> > >  #include <mach/pm.h>
> > >
> > >  #include <mach/dma.h>
> > > @@ -629,7 +629,8 @@ static int __devinit omap2_onenand_probe(struct
> > > platform_device *pdev) }
> > >
> > >  	if (c->gpio_irq) {
> > > -		if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> > > +		r = gpio_request(c->gpio_irq, "OneNAND Irq");
> > > +		if (r < 0) {
> > >  			dev_err(&pdev->dev,  "Failed to request GPIO%d for "
> > >  				"OneNAND\n", c->gpio_irq);
> > >  			goto err_iounmap;
> > > @@ -726,7 +727,7 @@ err_release_dma:
> > >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > >  err_release_gpio:
> > >  	if (c->gpio_irq)
> > > -		omap_free_gpio(c->gpio_irq);
> > > +		gpio_free(c->gpio_irq);
> > >  err_iounmap:
> > >  	iounmap(c->onenand.base);
> > >  err_release_mem_region:
> > > @@ -761,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct
> > > platform_device *pdev) platform_set_drvdata(pdev, NULL);
> > >  	if (c->gpio_irq) {
> > >  		free_irq(gpio_to_irq(c->gpio_irq), c);
> > > -		omap_free_gpio(c->gpio_irq);
> > > +		gpio_free(c->gpio_irq);
> > >  	}
> > >  	iounmap(c->onenand.base);
> > >  	release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> > > --
> > > 1.5.4.4.21.gc4a6c
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-01-08 13:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11 16:59 [PATCH] OMAP2 OneNAND GPIO fix Jean Pihet
2008-12-15 23:40 ` Tony Lindgren
2008-12-16  8:19   ` Jean Pihet
2008-12-16  8:39     ` Jarkko Nikula
2008-12-16 16:37       ` Tony Lindgren
2008-12-16 18:28         ` Jean Pihet
2009-01-08 12:10           ` Tony Lindgren
2009-01-08 12:56             ` Jean Pihet
2009-01-08 13:12               ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox