All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the pcmcia tree with the arm tree
@ 2012-03-05  3:22 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2012-03-05  3:22 UTC (permalink / raw)
  To: Dominik Brodowski; +Cc: linux-next, linux-kernel, Yong Zhang, Russell King

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

Hi Dominik,

Today's linux-next merge of the pcmcia tree got a conflict in
drivers/pcmcia/soc_common.c between commit a7670151a48c ("PCMCIA:
soc_common: remove soc_pcmcia_*_irqs functions") from the arm tree and
commit d571c79e86fa ("pcmcia: irq: Remove IRQF_DISABLED") from the pcmcia
tree.

The former removed the code modified by the latter, so I did that.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-05 11:07       ` Dominik Brodowski
@ 2009-12-06 16:51         ` Dmitry Artamonow
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Artamonow @ 2009-12-06 16:51 UTC (permalink / raw)
  To: Russell King
  Cc: Dominik Brodowski, linux-kernel, Stephen Rothwell, linux-next

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

On 12:07 Sat 05 Dec     , Dominik Brodowski wrote:
> On Sat, Dec 05, 2009 at 10:30:38AM +0000, Russell King wrote:
> > Since Dominik has been ignoring this issue, and has already asked Linus to
> > pull his tree with my (unfortunately just discovered buggy) changes in, I'm
> > going to drop the H3600 PCMCIA changes until something can be sorted out.
> 
> Well, I hope that Linus merges the first bunch of PCMCIA changes soon, so
> that we have a clean base to work from and to sort the dependecies in
> ARM-related patches out.

Well, looks like PCMCIA changes hit Linus' tree already, so the only way
now is to rebase h3600 patches. Closer look show that only one patch in
series needs rebasing - this one:
  ARM: 5811/1: pcmcia: convert sa1100_h3600 driver to gpiolib

Russell, I submitted rebased version to your patch system as 5811/2
It also attached to this letter. Hope this would help to resolve issue.

-- 
Best regards,
Dmitry "MAD" Artamonow


[-- Attachment #2: 0001-pcmcia-convert-sa1100_h3600-driver-to-gpiolib.patch --]
[-- Type: text/plain, Size: 4356 bytes --]

>From ce07b36a48f3b72d96f69c5138af3d0489ecd591 Mon Sep 17 00:00:00 2001
From: Dmitry Artamonow <mad_soft@inbox.ru>
Date: Wed, 14 Oct 2009 17:26:41 +0400
Subject: pcmcia: convert sa1100_h3600 driver to gpiolib

Convert all operations with GPLR/GPCR/GPSR to gpiolibs calls.
Also change all IRQ_GPIO* to gpio_to_irq(*GPIO*)

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 drivers/pcmcia/sa1100_h3600.c |   82 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 71 insertions(+), 11 deletions(-)

diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 3a121ac..97e5667 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -10,26 +10,78 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/gpio.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/h3600.h>
+#include <mach/h3600_gpio.h>
 
 #include "sa1100_generic.h"
 
 static struct pcmcia_irqs irqs[] = {
-	{ 0, IRQ_GPIO_H3600_PCMCIA_CD0, "PCMCIA CD0" },
-	{ 1, IRQ_GPIO_H3600_PCMCIA_CD1, "PCMCIA CD1" }
+	{ .sock = 0, .str = "PCMCIA CD0" }, /* .irq will be filled later */
+	{ .sock = 1, .str = "PCMCIA CD1" }
 };
 
 static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 {
-	skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
-				      : IRQ_GPIO_H3600_PCMCIA_IRQ0;
+	int err;
 
+	switch (skt->nr) {
+	case 0:
+		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ0, "PCMCIA IRQ0");
+		if (err)
+			goto err00;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ0);
+		if (err)
+			goto err01;
+		skt->socket.pci_irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ0);
+
+		err = gpio_request(H3XXX_GPIO_PCMCIA_CD0, "PCMCIA CD0");
+		if (err)
+			goto err01;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD0);
+		if (err)
+			goto err02;
+		irqs[0].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD0);
+
+		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		if (err)
+			goto err02;
+		break;
+	case 1:
+		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ1, "PCMCIA IRQ1");
+		if (err)
+			goto err10;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ1);
+		if (err)
+			goto err11;
+		skt->socket.pci_irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ1);
+
+		err = gpio_request(H3XXX_GPIO_PCMCIA_CD1, "PCMCIA CD1");
+		if (err)
+			goto err11;
+		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD1);
+		if (err)
+			goto err12;
+		irqs[1].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD1);
+
+		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+		if (err)
+			goto err12;
+		break;
+	}
+	return 0;
+
+err02:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+err01:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+err00:	return err;
 
-	return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+err12:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+err11:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+err10:	return err;
 }
 
 static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
@@ -40,17 +92,25 @@ static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
 	assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
+	switch (skt->nr) {
+	case 0:
+		gpio_free(H3XXX_GPIO_PCMCIA_CD0);
+		gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
+		break;
+	case 1:
+		gpio_free(H3XXX_GPIO_PCMCIA_CD1);
+		gpio_free(H3XXX_GPIO_PCMCIA_IRQ1);
+		break;
+	}
 }
 
 static void
 h3600_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
 {
-	unsigned long levels = GPLR;
-
 	switch (skt->nr) {
 	case 0:
-		state->detect = levels & GPIO_H3600_PCMCIA_CD0 ? 0 : 1;
-		state->ready = levels & GPIO_H3600_PCMCIA_IRQ0 ? 1 : 0;
+		state->detect = !gpio_get_value(H3XXX_GPIO_PCMCIA_CD0);
+		state->ready = !!gpio_get_value(H3XXX_GPIO_PCMCIA_IRQ0);
 		state->bvd1 = 0;
 		state->bvd2 = 0;
 		state->wrprot = 0; /* Not available on H3600. */
@@ -59,8 +119,8 @@ h3600_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *st
 		break;
 
 	case 1:
-		state->detect = levels & GPIO_H3600_PCMCIA_CD1 ? 0 : 1;
-		state->ready = levels & GPIO_H3600_PCMCIA_IRQ1 ? 1 : 0;
+		state->detect = !gpio_get_value(H3XXX_GPIO_PCMCIA_CD1);
+		state->ready = !!gpio_get_value(H3XXX_GPIO_PCMCIA_IRQ1);
 		state->bvd1 = 0;
 		state->bvd2 = 0;
 		state->wrprot = 0; /* Not available on H3600. */
-- 
1.6.3.4


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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-05 10:30     ` Russell King
@ 2009-12-05 11:07       ` Dominik Brodowski
  2009-12-06 16:51         ` Dmitry Artamonow
  0 siblings, 1 reply; 8+ messages in thread
From: Dominik Brodowski @ 2009-12-05 11:07 UTC (permalink / raw)
  To: Russell King; +Cc: Stephen Rothwell, Dmitry Artamonow, linux-next, linux-kernel

On Sat, Dec 05, 2009 at 10:30:38AM +0000, Russell King wrote:
> On Thu, Dec 03, 2009 at 09:25:25AM +1100, Stephen Rothwell wrote:
> > Hi Dmitry,
> > 
> > On Wed, 2 Dec 2009 14:56:49 +0300 Dmitry Artamonow <mad_soft@inbox.ru> wrote:
> > >
> > > Fix looks good to me, and testing next-20091201 on real device (h3600)
> > > shows no problems with pcmcia.
> > 
> > Thanks for the confirmation.
> 
> Since Dominik has been ignoring this issue, and has already asked Linus to
> pull his tree with my (unfortunately just discovered buggy) changes in, I'm
> going to drop the H3600 PCMCIA changes until something can be sorted out.

Well, I hope that Linus merges the first bunch of PCMCIA changes soon, so
that we have a clean base to work from and to sort the dependecies in
ARM-related patches out.

Best,
	Dominik

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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-02 22:25   ` Stephen Rothwell
@ 2009-12-05 10:30     ` Russell King
  2009-12-05 11:07       ` Dominik Brodowski
  0 siblings, 1 reply; 8+ messages in thread
From: Russell King @ 2009-12-05 10:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dmitry Artamonow, Dominik Brodowski, linux-next, linux-kernel

On Thu, Dec 03, 2009 at 09:25:25AM +1100, Stephen Rothwell wrote:
> Hi Dmitry,
> 
> On Wed, 2 Dec 2009 14:56:49 +0300 Dmitry Artamonow <mad_soft@inbox.ru> wrote:
> >
> > Fix looks good to me, and testing next-20091201 on real device (h3600)
> > shows no problems with pcmcia.
> 
> Thanks for the confirmation.

Since Dominik has been ignoring this issue, and has already asked Linus to
pull his tree with my (unfortunately just discovered buggy) changes in, I'm
going to drop the H3600 PCMCIA changes until something can be sorted out.

There's nothing like communication between maintainers...

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-02 11:56 ` Dmitry Artamonow
  2009-12-02 22:25   ` Stephen Rothwell
@ 2009-12-03 17:04   ` Russell King
  1 sibling, 0 replies; 8+ messages in thread
From: Russell King @ 2009-12-03 17:04 UTC (permalink / raw)
  To: Dmitry Artamonow
  Cc: Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel

On Wed, Dec 02, 2009 at 02:56:49PM +0300, Dmitry Artamonow wrote:
> On 14:03 Tue 01 Dec     , Stephen Rothwell wrote:
> > Hi Dominik,
> > 
> > Today's linux-next merge of the pcmcia tree got a conflict in
> > drivers/pcmcia/sa1100_h3600.c between commit
> > 6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
> > sa1100_h3600 driver to gpiolib") from the arm tree and commit
> > 66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
> > pci_irq in soc_pcmcia_socket") from the pcmcia tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary.  Please
> > check the fix below.
> 
> Fix looks good to me, and testing next-20091201 on real device (h3600)
> shows no problems with pcmcia.
> 
> Perhaps this merge conflict can be avoided by merging Russell's PCMCIA
> patches through arm tree. But, anyway, it's Russell and Dominik
> to decide.

If that's what Dominik would like me to do.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-02 11:56 ` Dmitry Artamonow
@ 2009-12-02 22:25   ` Stephen Rothwell
  2009-12-05 10:30     ` Russell King
  2009-12-03 17:04   ` Russell King
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-12-02 22:25 UTC (permalink / raw)
  To: Dmitry Artamonow
  Cc: Dominik Brodowski, linux-next, linux-kernel, Russell King

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

Hi Dmitry,

On Wed, 2 Dec 2009 14:56:49 +0300 Dmitry Artamonow <mad_soft@inbox.ru> wrote:
>
> Fix looks good to me, and testing next-20091201 on real device (h3600)
> shows no problems with pcmcia.

Thanks for the confirmation.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: manual merge of the pcmcia tree with the arm tree
  2009-12-01  3:03 Stephen Rothwell
@ 2009-12-02 11:56 ` Dmitry Artamonow
  2009-12-02 22:25   ` Stephen Rothwell
  2009-12-03 17:04   ` Russell King
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Artamonow @ 2009-12-02 11:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dominik Brodowski, linux-next, linux-kernel, Russell King

On 14:03 Tue 01 Dec     , Stephen Rothwell wrote:
> Hi Dominik,
> 
> Today's linux-next merge of the pcmcia tree got a conflict in
> drivers/pcmcia/sa1100_h3600.c between commit
> 6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
> sa1100_h3600 driver to gpiolib") from the arm tree and commit
> 66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
> pci_irq in soc_pcmcia_socket") from the pcmcia tree.
> 
> I fixed it up (see below) and can carry the fix as necessary.  Please
> check the fix below.

Fix looks good to me, and testing next-20091201 on real device (h3600)
shows no problems with pcmcia.

Perhaps this merge conflict can be avoided by merging Russell's PCMCIA
patches through arm tree. But, anyway, it's Russell and Dominik
to decide.

-- 
Best regards,
Dmitry "MAD" Artamonow


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

* linux-next: manual merge of the pcmcia tree with the arm tree
@ 2009-12-01  3:03 Stephen Rothwell
  2009-12-02 11:56 ` Dmitry Artamonow
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-12-01  3:03 UTC (permalink / raw)
  To: Dominik Brodowski
  Cc: linux-next, linux-kernel, Dmitry Artamonow, Russell King

Hi Dominik,

Today's linux-next merge of the pcmcia tree got a conflict in
drivers/pcmcia/sa1100_h3600.c between commit
6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
sa1100_h3600 driver to gpiolib") from the arm tree and commit
66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
pci_irq in soc_pcmcia_socket") from the pcmcia tree.

I fixed it up (see below) and can carry the fix as necessary.  Please
check the fix below.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/pcmcia/sa1100_h3600.c
index b763cea,3a121ac..0000000
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@@ -26,89 -25,11 +26,89 @@@ static struct pcmcia_irqs irqs[] = 
  
  static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
  {
 -	skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
 -				      : IRQ_GPIO_H3600_PCMCIA_IRQ0;
 +	int err;
  
 +	switch (skt->nr) {
 +	case 0:
 +		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ0, "PCMCIA IRQ0");
 +		if (err)
 +			goto err00;
 +		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ0);
 +		if (err)
 +			goto err01;
- 		skt->irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ0);
++		skt->socket.pci_irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ0);
 +
 +		err = gpio_request(H3XXX_GPIO_PCMCIA_CD0, "PCMCIA CD0");
 +		if (err)
 +			goto err01;
 +		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD0);
 +		if (err)
 +			goto err02;
 +		irqs[0].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD0);
 +
 +		err = gpio_request(H3XXX_EGPIO_OPT_NVRAM_ON, "OPT NVRAM ON");
 +		if (err)
 +			goto err02;
 +		err = gpio_direction_output(H3XXX_EGPIO_OPT_NVRAM_ON, 0);
 +		if (err)
 +			goto err03;
 +		err = gpio_request(H3XXX_EGPIO_OPT_ON, "OPT ON");
 +		if (err)
 +			goto err03;
 +		err = gpio_direction_output(H3XXX_EGPIO_OPT_ON, 0);
 +		if (err)
 +			goto err04;
 +		err = gpio_request(H3XXX_EGPIO_OPT_RESET, "OPT RESET");
 +		if (err)
 +			goto err04;
 +		err = gpio_direction_output(H3XXX_EGPIO_OPT_RESET, 0);
 +		if (err)
 +			goto err05;
 +		err = gpio_request(H3XXX_EGPIO_CARD_RESET, "PCMCIA CARD RESET");
 +		if (err)
 +			goto err05;
 +		err = gpio_direction_output(H3XXX_EGPIO_CARD_RESET, 0);
 +		if (err)
 +			goto err06;
 +		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
 +		if (err)
 +			goto err06;
 +		break;
 +	case 1:
 +		err = gpio_request(H3XXX_GPIO_PCMCIA_IRQ1, "PCMCIA IRQ1");
 +		if (err)
 +			goto err10;
 +		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_IRQ1);
 +		if (err)
 +			goto err11;
- 		skt->irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ1);
++		skt->socket.pci_irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_IRQ1);
 +
 +		err = gpio_request(H3XXX_GPIO_PCMCIA_CD1, "PCMCIA CD1");
 +		if (err)
 +			goto err11;
 +		err = gpio_direction_input(H3XXX_GPIO_PCMCIA_CD1);
 +		if (err)
 +			goto err12;
 +		irqs[1].irq = gpio_to_irq(H3XXX_GPIO_PCMCIA_CD1);
 +
 +		err = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
 +		if (err)
 +			goto err12;
 +		break;
 +	}
 +	return 0;
  
 -	return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
 +err06:	gpio_free(H3XXX_EGPIO_CARD_RESET);
 +err05:	gpio_free(H3XXX_EGPIO_OPT_RESET);
 +err04:	gpio_free(H3XXX_EGPIO_OPT_ON);
 +err03:	gpio_free(H3XXX_EGPIO_OPT_NVRAM_ON);
 +err02:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
 +err01:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
 +err00:	return err;
 +
 +err12:	gpio_free(H3XXX_GPIO_PCMCIA_CD0);
 +err11:	gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
 +err10:	return err;
  }
  
  static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)

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

end of thread, other threads:[~2012-03-05  3:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05  3:22 linux-next: manual merge of the pcmcia tree with the arm tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2009-12-01  3:03 Stephen Rothwell
2009-12-02 11:56 ` Dmitry Artamonow
2009-12-02 22:25   ` Stephen Rothwell
2009-12-05 10:30     ` Russell King
2009-12-05 11:07       ` Dominik Brodowski
2009-12-06 16:51         ` Dmitry Artamonow
2009-12-03 17:04   ` Russell King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.