From: Jean Pihet <jpihet@mvista.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP2 OneNAND GPIO fix
Date: Tue, 16 Dec 2008 19:28:48 +0100 [thread overview]
Message-ID: <200812161928.49147.jpihet@mvista.com> (raw)
In-Reply-To: <20081216163702.GQ19551@atomide.com>
[-- 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
next prev parent reply other threads:[~2008-12-16 18:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-01-08 12:10 ` Tony Lindgren
2009-01-08 12:56 ` Jean Pihet
2009-01-08 13:12 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812161928.49147.jpihet@mvista.com \
--to=jpihet@mvista.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox