All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the pcmcia tree with the pxa tree
@ 2009-11-30  2:16 Stephen Rothwell
  2009-11-30  3:17 ` Eric Miao
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2009-11-30  2:16 UTC (permalink / raw)
  To: Dominik Brodowski
  Cc: linux-next, linux-kernel, Eric Miao, Marc Zyngier,
	Russell King - ARM Linux

Hi Dominik,

Today's linux-next merge of the pcmcia tree got a conflict in drivers/pcmcia/pxa2xx_viper.c between commit c9b74a4489db7e6fe03fbee11f406b9641baae55 ("[ARM] pxa/zeus: make Viper pcmcia support more generic to support Zeus") from the pxa 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.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/pcmcia/pxa2xx_viper.c
index 7a16ae9,27be2e1..0000000
--- a/drivers/pcmcia/pxa2xx_viper.c
+++ b/drivers/pcmcia/pxa2xx_viper.c
@@@ -30,35 -32,23 +30,35 @@@
  #include "soc_common.h"
  #include "pxa2xx_base.h"
  
 +static struct platform_device *arcom_pcmcia_dev;
 +
  static struct pcmcia_irqs irqs[] = {
 -	{ 0, gpio_to_irq(VIPER_CF_CD_GPIO),  "PCMCIA_CD" }
 +	{
 +		.sock	= 0,
 +		.str	= "PCMCIA_CD",
 +	},
  };
  
 +static inline struct arcom_pcmcia_pdata *viper_get_pdata(void)
 +{
 +	return arcom_pcmcia_dev->dev.platform_data;
 +}
 +
  static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
  {
 +	struct arcom_pcmcia_pdata *pdata = viper_get_pdata();
  	unsigned long flags;
  
- 	skt->irq = gpio_to_irq(pdata->rdy_gpio);
 -	skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
++	skt->socket.pci_irq = gpio_to_irq(pdata->rdy_gpio);
 +	irqs[0].irq = gpio_to_irq(pdata->cd_gpio);
  
 -	if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
 +	if (gpio_request(pdata->cd_gpio, "CF detect"))
  		goto err_request_cd;
  
 -	if (gpio_request(VIPER_CF_RDY_GPIO, "CF ready"))
 +	if (gpio_request(pdata->rdy_gpio, "CF ready"))
  		goto err_request_rdy;
  
 -	if (gpio_request(VIPER_CF_POWER_GPIO, "CF power"))
 +	if (gpio_request(pdata->pwr_gpio, "CF power"))
  		goto err_request_pwr;
  
  	local_irq_save(flags);

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  2:16 linux-next: manual merge of the pcmcia tree with the pxa tree Stephen Rothwell
@ 2009-11-30  3:17 ` Eric Miao
  2009-11-30  8:10   ` Marc Zyngier
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Miao @ 2009-11-30  3:17 UTC (permalink / raw)
  To: Marc Zyngier, Stephen Rothwell
  Cc: Dominik Brodowski, linux-next, linux-kernel, Russell King - ARM Linux

Hi Marc,

Could you take a look into this, I wonder you may need to rebase
against Russell's
PCMCIA generalization stuffs. Let me know if you want me to drop this patch.

- eric

On Mon, Nov 30, 2009 at 10:16 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Dominik,
>
> Today's linux-next merge of the pcmcia tree got a conflict in drivers/pcmcia/pxa2xx_viper.c between commit c9b74a4489db7e6fe03fbee11f406b9641baae55 ("[ARM] pxa/zeus: make Viper pcmcia support more generic to support Zeus") from the pxa 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.
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
>
> diff --cc drivers/pcmcia/pxa2xx_viper.c
> index 7a16ae9,27be2e1..0000000
> --- a/drivers/pcmcia/pxa2xx_viper.c
> +++ b/drivers/pcmcia/pxa2xx_viper.c
> @@@ -30,35 -32,23 +30,35 @@@
>  #include "soc_common.h"
>  #include "pxa2xx_base.h"
>
>  +static struct platform_device *arcom_pcmcia_dev;
>  +
>  static struct pcmcia_irqs irqs[] = {
>  -      { 0, gpio_to_irq(VIPER_CF_CD_GPIO),  "PCMCIA_CD" }
>  +      {
>  +              .sock   = 0,
>  +              .str    = "PCMCIA_CD",
>  +      },
>  };
>
>  +static inline struct arcom_pcmcia_pdata *viper_get_pdata(void)
>  +{
>  +      return arcom_pcmcia_dev->dev.platform_data;
>  +}
>  +
>  static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
>  {
>  +      struct arcom_pcmcia_pdata *pdata = viper_get_pdata();
>        unsigned long flags;
>
> -       skt->irq = gpio_to_irq(pdata->rdy_gpio);
>  -      skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
> ++      skt->socket.pci_irq = gpio_to_irq(pdata->rdy_gpio);
>  +      irqs[0].irq = gpio_to_irq(pdata->cd_gpio);
>
>  -      if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
>  +      if (gpio_request(pdata->cd_gpio, "CF detect"))
>                goto err_request_cd;
>
>  -      if (gpio_request(VIPER_CF_RDY_GPIO, "CF ready"))
>  +      if (gpio_request(pdata->rdy_gpio, "CF ready"))
>                goto err_request_rdy;
>
>  -      if (gpio_request(VIPER_CF_POWER_GPIO, "CF power"))
>  +      if (gpio_request(pdata->pwr_gpio, "CF power"))
>                goto err_request_pwr;
>
>        local_irq_save(flags);
>

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  3:17 ` Eric Miao
@ 2009-11-30  8:10   ` Marc Zyngier
  2009-11-30  8:16     ` Eric Miao
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Zyngier @ 2009-11-30  8:10 UTC (permalink / raw)
  To: Eric Miao
  Cc: Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel,
	Russell King - ARM Linux

On Mon, 30 Nov 2009 11:17:08 +0800
Eric Miao <eric.y.miao@gmail.com> wrote:

Hi Eric,

> Could you take a look into this, I wonder you may need to rebase
> against Russell's PCMCIA generalization stuffs. Let me know if you
> want me to drop this patch.

Patch looks good. I'm more worried about creating dependencies between
trees:

- Stephen fix depends on Russell's changes, which are in Dominik's tree,
- My patch depends on Zeus support, which is in your tree,
- Rebasing Zeus PCMCIA support against Dominik's tree is just another
  dependency between the two trees.

Should we drop my PCMCIA changes until both Russell's changes and main
Zeus support are merged?

I'm opened to any suggestion.

	M.

> 
> On Mon, Nov 30, 2009 at 10:16 AM, Stephen Rothwell
> <sfr@canb.auug.org.au> wrote:
> > Hi Dominik,
> >
> > Today's linux-next merge of the pcmcia tree got a conflict in
> > drivers/pcmcia/pxa2xx_viper.c between commit
> > c9b74a4489db7e6fe03fbee11f406b9641baae55 ("[ARM] pxa/zeus: make
> > Viper pcmcia support more generic to support Zeus") from the pxa
> > 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.
> > --
> > Cheers,
> > Stephen Rothwell                    sfr@canb.auug.org.au
> >
> > diff --cc drivers/pcmcia/pxa2xx_viper.c
> > index 7a16ae9,27be2e1..0000000
> > --- a/drivers/pcmcia/pxa2xx_viper.c
> > +++ b/drivers/pcmcia/pxa2xx_viper.c
> > @@@ -30,35 -32,23 +30,35 @@@
> >  #include "soc_common.h"
> >  #include "pxa2xx_base.h"
> >
> >  +static struct platform_device *arcom_pcmcia_dev;
> >  +
> >  static struct pcmcia_irqs irqs[] = {
> >  -      { 0, gpio_to_irq(VIPER_CF_CD_GPIO),  "PCMCIA_CD" }
> >  +      {
> >  +              .sock   = 0,
> >  +              .str    = "PCMCIA_CD",
> >  +      },
> >  };
> >
> >  +static inline struct arcom_pcmcia_pdata *viper_get_pdata(void)
> >  +{
> >  +      return arcom_pcmcia_dev->dev.platform_data;
> >  +}
> >  +
> >  static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
> >  {
> >  +      struct arcom_pcmcia_pdata *pdata = viper_get_pdata();
> >        unsigned long flags;
> >
> > -       skt->irq = gpio_to_irq(pdata->rdy_gpio);
> >  -      skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
> > ++      skt->socket.pci_irq = gpio_to_irq(pdata->rdy_gpio);
> >  +      irqs[0].irq = gpio_to_irq(pdata->cd_gpio);
> >
> >  -      if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
> >  +      if (gpio_request(pdata->cd_gpio, "CF detect"))
> >                goto err_request_cd;
> >
> >  -      if (gpio_request(VIPER_CF_RDY_GPIO, "CF ready"))
> >  +      if (gpio_request(pdata->rdy_gpio, "CF ready"))
> >                goto err_request_rdy;
> >
> >  -      if (gpio_request(VIPER_CF_POWER_GPIO, "CF power"))
> >  +      if (gpio_request(pdata->pwr_gpio, "CF power"))
> >                goto err_request_pwr;
> >
> >        local_irq_save(flags);
> >
> 


-- 
And if you don't know where you're going, any road will take you
there...

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  8:10   ` Marc Zyngier
@ 2009-11-30  8:16     ` Eric Miao
  2009-11-30  9:24       ` Marc Zyngier
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Miao @ 2009-11-30  8:16 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel,
	Russell King - ARM Linux

On Mon, Nov 30, 2009 at 4:10 PM, Marc Zyngier <maz@misterjones.org> wrote:
> On Mon, 30 Nov 2009 11:17:08 +0800
> Eric Miao <eric.y.miao@gmail.com> wrote:
>
> Hi Eric,
>
>> Could you take a look into this, I wonder you may need to rebase
>> against Russell's PCMCIA generalization stuffs. Let me know if you
>> want me to drop this patch.
>
> Patch looks good. I'm more worried about creating dependencies between
> trees:
>
> - Stephen fix depends on Russell's changes, which are in Dominik's tree,
> - My patch depends on Zeus support, which is in your tree,
> - Rebasing Zeus PCMCIA support against Dominik's tree is just another
>  dependency between the two trees.
>
> Should we drop my PCMCIA changes until both Russell's changes and main
> Zeus support are merged?
>

I'd propose to postpone your patches until dependency is resolved, will
send a second git pull til then. Sounds OK to you?

> I'm opened to any suggestion.
>
>        M.
>
>>
>> On Mon, Nov 30, 2009 at 10:16 AM, Stephen Rothwell
>> <sfr@canb.auug.org.au> wrote:
>> > Hi Dominik,
>> >
>> > Today's linux-next merge of the pcmcia tree got a conflict in
>> > drivers/pcmcia/pxa2xx_viper.c between commit
>> > c9b74a4489db7e6fe03fbee11f406b9641baae55 ("[ARM] pxa/zeus: make
>> > Viper pcmcia support more generic to support Zeus") from the pxa
>> > 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.
>> > --
>> > Cheers,
>> > Stephen Rothwell                    sfr@canb.auug.org.au
>> >
>> > diff --cc drivers/pcmcia/pxa2xx_viper.c
>> > index 7a16ae9,27be2e1..0000000
>> > --- a/drivers/pcmcia/pxa2xx_viper.c
>> > +++ b/drivers/pcmcia/pxa2xx_viper.c
>> > @@@ -30,35 -32,23 +30,35 @@@
>> >  #include "soc_common.h"
>> >  #include "pxa2xx_base.h"
>> >
>> >  +static struct platform_device *arcom_pcmcia_dev;
>> >  +
>> >  static struct pcmcia_irqs irqs[] = {
>> >  -      { 0, gpio_to_irq(VIPER_CF_CD_GPIO),  "PCMCIA_CD" }
>> >  +      {
>> >  +              .sock   = 0,
>> >  +              .str    = "PCMCIA_CD",
>> >  +      },
>> >  };
>> >
>> >  +static inline struct arcom_pcmcia_pdata *viper_get_pdata(void)
>> >  +{
>> >  +      return arcom_pcmcia_dev->dev.platform_data;
>> >  +}
>> >  +
>> >  static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
>> >  {
>> >  +      struct arcom_pcmcia_pdata *pdata = viper_get_pdata();
>> >        unsigned long flags;
>> >
>> > -       skt->irq = gpio_to_irq(pdata->rdy_gpio);
>> >  -      skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
>> > ++      skt->socket.pci_irq = gpio_to_irq(pdata->rdy_gpio);
>> >  +      irqs[0].irq = gpio_to_irq(pdata->cd_gpio);
>> >
>> >  -      if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
>> >  +      if (gpio_request(pdata->cd_gpio, "CF detect"))
>> >                goto err_request_cd;
>> >
>> >  -      if (gpio_request(VIPER_CF_RDY_GPIO, "CF ready"))
>> >  +      if (gpio_request(pdata->rdy_gpio, "CF ready"))
>> >                goto err_request_rdy;
>> >
>> >  -      if (gpio_request(VIPER_CF_POWER_GPIO, "CF power"))
>> >  +      if (gpio_request(pdata->pwr_gpio, "CF power"))
>> >                goto err_request_pwr;
>> >
>> >        local_irq_save(flags);
>> >
>>
>
>
> --
> And if you don't know where you're going, any road will take you
> there...
>

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  8:16     ` Eric Miao
@ 2009-11-30  9:24       ` Marc Zyngier
  2009-11-30  9:48         ` Russell King - ARM Linux
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Zyngier @ 2009-11-30  9:24 UTC (permalink / raw)
  To: Eric Miao
  Cc: Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel,
	Russell King - ARM Linux

On Mon, 30 Nov 2009 16:16:38 +0800
Eric Miao <eric.y.miao@gmail.com> wrote:

> On Mon, Nov 30, 2009 at 4:10 PM, Marc Zyngier <maz@misterjones.org>
> wrote:
> > On Mon, 30 Nov 2009 11:17:08 +0800
> > Eric Miao <eric.y.miao@gmail.com> wrote:
> >
> > Hi Eric,
> >
> >> Could you take a look into this, I wonder you may need to rebase
> >> against Russell's PCMCIA generalization stuffs. Let me know if you
> >> want me to drop this patch.
> >
> > Patch looks good. I'm more worried about creating dependencies
> > between trees:
> >
> > - Stephen fix depends on Russell's changes, which are in Dominik's
> > tree,
> > - My patch depends on Zeus support, which is in your tree,
> > - Rebasing Zeus PCMCIA support against Dominik's tree is just
> > another dependency between the two trees.
> >
> > Should we drop my PCMCIA changes until both Russell's changes and
> > main Zeus support are merged?
> >
> 
> I'd propose to postpone your patches until dependency is resolved,
> will send a second git pull til then. Sounds OK to you?

Sounds good. I'll post rebased patches as soon as PCMCIA hits Linus'
tree.

Thanks,

	M.
-- 
Fast. Cheap. Reliable. Pick two.

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  9:24       ` Marc Zyngier
@ 2009-11-30  9:48         ` Russell King - ARM Linux
  2009-12-06  9:49           ` Marc Zyngier
  0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2009-11-30  9:48 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Eric Miao, Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel

On Mon, Nov 30, 2009 at 10:24:44AM +0100, Marc Zyngier wrote:
> Sounds good. I'll post rebased patches as soon as PCMCIA hits Linus'
> tree.

What would be a better idea is to rework the driver once my changes have
hit.  If you need to pass additional data around, you can do it like this:

struct my_socket {
	struct soc_pcmcia_socket skt;
	...
};

#define to_my_socket(s) container_of(s, struct my_socket, skt)

static struct pcmcia_low_level my_ops = {
};

static int my_probe(struct platform_device *dev)
{
	struct my_socket *skts;

	pxa2xx_drv_pcmcia_ops(&my_ops);

	skts = kzalloc(sizeof(*skts) * nr, GFP_KERNEL);
	if (!skts)
		...

	for (i = 0; i < nr; i++) {
		skts[i].skt.nr = i;
		skts[i].skt.ops = &my_ops;
		skts[i].skt.socket.owner = THIS_MODULE;
		skts[i].skt.socket.parent = &dev->dev;
		skts[i].skt.socket.pci_irq = the_socket_irq;
		ret = pxa2xx_drv_pcmcia_add_one(&skts[i].skt);
		if (ret)
			goto free_registered_sockets_and_return_ret;
	}
}

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

* Re: linux-next: manual merge of the pcmcia tree with the pxa tree
  2009-11-30  9:48         ` Russell King - ARM Linux
@ 2009-12-06  9:49           ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2009-12-06  9:49 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Eric Miao, Stephen Rothwell, Dominik Brodowski, linux-next, linux-kernel

On Mon, 30 Nov 2009 09:48:13 +0000
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

Hi Russell,

> What would be a better idea is to rework the driver once my changes
> have hit.  If you need to pass additional data around, you can do it
> like this:

Now that your changes are in Linus' tree, I started looking at
restructuring my code. I sense a small problem though:

[...]
> 	for (i = 0; i < nr; i++) {
> 		skts[i].skt.nr = i;
> 		skts[i].skt.ops = &my_ops;
> 		skts[i].skt.socket.owner = THIS_MODULE;
> 		skts[i].skt.socket.parent = &dev->dev;
> 		skts[i].skt.socket.pci_irq = the_socket_irq;
> 		ret = pxa2xx_drv_pcmcia_add_one(&skts[i].skt);

Unless I'm mistaken, it seems that pxa2xx_drv_pcmcia_add_one() doesn't
call pxa2xx_configure_sockets(), leaving the sockets disabled.

There is several ways to solve this one:
- Add the call to pxa2xx_configure_sockets() to _add_one()
- Do the MECR access in the pxa2xx_viper driver,
- export pxa2xx_configure_sockets() and do the call locally.

What would be your preferred solution?

	M.
-- 
I'm the slime oozin' out from your TV set...

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

* linux-next: manual merge of the pcmcia tree with the pxa tree
@ 2009-11-30  2:16 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-11-30  2:16 UTC (permalink / raw)
  To: Dominik Brodowski
  Cc: linux-next, linux-kernel, Marc Zyngier, Eric Miao,
	Russell King - ARM Linux

Hi Dominik,

Today's linux-next merge of the pcmcia tree got a conflict in
drivers/pcmcia/Kconfig between commit
c9b74a4489db7e6fe03fbee11f406b9641baae55 ("[ARM] pxa/zeus: make Viper
pcmcia support more generic to support Zeus") from the pxa tree and
commit 0f767de6a26a07f7d58394512b6f6c96322f047f ("PCMCIA: soc_common:
convert to a stand alone module") from the pcmcia tree.

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

diff --cc drivers/pcmcia/Kconfig
index d3faec3,f3ccbcc..0000000
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@@ -242,7 -208,8 +229,8 @@@ config PCMCIA_PXA2X
  	depends on ARM && ARCH_PXA && PCMCIA
  	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
  		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
 -		    || ARCH_VIPER || ARCH_PXA_ESERIES || MACH_STARGATE2)
 +		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2)
+ 	select PCMCIA_SOC_COMMON
  	help
  	  Say Y here to include support for the PXA2xx PCMCIA controller
  

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

end of thread, other threads:[~2009-12-06  9:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30  2:16 linux-next: manual merge of the pcmcia tree with the pxa tree Stephen Rothwell
2009-11-30  3:17 ` Eric Miao
2009-11-30  8:10   ` Marc Zyngier
2009-11-30  8:16     ` Eric Miao
2009-11-30  9:24       ` Marc Zyngier
2009-11-30  9:48         ` Russell King - ARM Linux
2009-12-06  9:49           ` Marc Zyngier
  -- strict thread matches above, loose matches on Subject: below --
2009-11-30  2:16 Stephen Rothwell

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.