Skip to contentSkip to conversation

OMAP2 OneNAND GPIO fix

PATCH In review Jean Pihet 3 participants 9 messages Dec 11, 2008 – Jan 8, 2009 Memory technology devices (MTD)

lore
Share & tools
lore

Jean Pihet

author
#0 lore raw

PATCH 1/1 OMAP2 OneNAND GPIO fix

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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +1 -1
index 762623f..f223303 100644
@@ -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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +7 -6
index 762623f..f223303 100644
@@ -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);
Signature · 1 line
1.5.4.4.21.gc4a6c
#1 lore raw
Quoted 4 lines · Jean Pihet

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

Quoted 165 lines

Regards,
Jean

From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +2 -2
index 762623f..f223303 100644
@@ -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);
drivers/mtd/onenand/omap2.c +3 -2
@@ -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,

drivers/mtd/onenand/omap2.c +2 -2
@@ -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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +7 -6
index 762623f..f223303 100644
@@ -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);
Signature · 1 line
1.5.4.4.21.gc4a6c
author
#2 lore raw
Quoted 8 lines · On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
Quoted 4 lines · Jean Pihet

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.

Quoted 169 lines

Regards,

Tony

Quoted 164 lines

Regards,
Jean

From f95826f916cde9c0d0da79e006f090bc69112a1e Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +2 -2
index 762623f..f223303 100644
@@ -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) {
drivers/mtd/onenand/omap2.c +2 -1
-               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;
        }
drivers/mtd/onenand/omap2.c +1 -1
-       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)
drivers/mtd/onenand/omap2.c +2 -2
-               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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +2 -2
index 762623f..f223303 100644
@@ -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);
drivers/mtd/onenand/omap2.c +5 -5
 				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

#3 lore raw
Quoted 4 lines · On Tue, 16 Dec 2008 09:19:24 +0100 "ext Jean Pihet" <[email protected]> wrote:
Quoted 3 lines · On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
Quoted 2 lines · Jean Pihet

Hi,

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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

#4 lore raw
Quoted 10 lines · Jarkko Nikula
Quoted 7 lines · On Tue, 16 Dec 2008 09:19:24 +0100 "ext Jean Pihet" <[email protected]> wrote:
Quoted 6 lines · On Tuesday 16 December 2008 00:40:59 Tony Lindgren wrote:
Quoted 4 lines · Jean Pihet

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.

Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

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

author
#5 lore raw

Tony,

Quoted 8 lines

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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +1 -1
index d1e0b8e..f223303 100644
@@ -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);

Signature · 1 line
1.5.4.4.21.gc4a6c

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +5 -4
index d1e0b8e..f223303 100644
@@ -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);
Signature · 1 line
1.5.4.4.21.gc4a6c
#6 lore raw
Quoted 5 lines · Jean Pihet

Tony,

Quoted 3 lines

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

Quoted 8 lines
Quoted 5 lines

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

Quoted 132 lines

Regards,
Jean.

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +3 -2
index d1e0b8e..f223303 100644
@@ -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);
drivers/mtd/onenand/omap2.c +2 -2
 			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);

Signature · 16 lines
1.5.4.4.21.gc4a6c

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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 <[email protected]>
---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +5 -4
index d1e0b8e..f223303 100644
@@ -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);
Signature · 1 line
1.5.4.4.21.gc4a6c
author
#7 lore raw
Quoted 12 lines · On Thursday 08 January 2009 13:10:37 Tony Lindgren wrote:
Quoted 11 lines · Jean Pihet

Tony,

Quoted 8 lines

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.

Quoted 7 lines
Quoted 3 lines

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?

Quoted 135 lines

Thanks,

Tony

Quoted 130 lines

Regards,
Jean.

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +3 -2
index d1e0b8e..f223303 100644
@@ -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);
drivers/mtd/onenand/omap2.c +2 -2
 			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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +5 -5
index d1e0b8e..f223303 100644
@@ -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

#8 lore raw
Quoted 13 lines · Jean Pihet
Quoted 12 lines · On Thursday 08 January 2009 13:10:37 Tony Lindgren wrote:
Quoted 11 lines · Jean Pihet

Tony,

Quoted 8 lines

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.

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

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

Quoted 138 lines
Quoted 136 lines

Thanks,

Tony

Quoted 130 lines

Regards,
Jean.

From a4f548c3f51c9a349decc761dd539499902873f5 Mon Sep 17 00:00:00 2001
From: Jean Pihet <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +3 -2
index d1e0b8e..f223303 100644
@@ -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);
drivers/mtd/onenand/omap2.c +2 -2
 			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 <[email protected]>
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.

---
 drivers/mtd/onenand/omap2.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/onenand/omap2.c +5 -5
index d1e0b8e..f223303 100644
@@ -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