2009-12-01 03:03:11

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the pcmcia tree with the arm tree

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

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)


2009-12-02 12:56:42

by Dmitry Artamonow

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

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

2009-12-02 22:25:30

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

Hi Dmitry,

On Wed, 2 Dec 2009 14:56:49 +0300 Dmitry Artamonow <[email protected]> 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 [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (332.00 B)
(No filename) (198.00 B)
Download all attachments

2009-12-03 17:05:11

by Russell King

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

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:

2009-12-05 10:30:55

by Russell King

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

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

2009-12-05 11:07:19

by Dominik Brodowski

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

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

2009-12-06 16:51:51

by Dmitry Artamonow

[permalink] [raw]
Subject: Re: linux-next: manual merge of the pcmcia tree with the arm tree

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


Attachments:
(No filename) (956.00 B)
0001-pcmcia-convert-sa1100_h3600-driver-to-gpiolib.patch (4.25 kB)
Download all attachments