mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the devicetree tree with the galak tree
@ 2011-03-16  4:46 Stephen Rothwell
  2011-03-16  4:53 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2011-03-16  4:46 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-next, linux-kernel, Scott Wood, Kumar Gala

Hi Grant,

Today's linux-next merge of the devicetree tree got a conflict in
arch/powerpc/sysdev/fsl_msi.c between commit 6820fead714d
("powerpc/fsl_msi: Handle msi-available-ranges better") from the galak
tree and commit 000061245a67 ("dt/powerpc: Eliminate users of of_platform_
{,un}register_driver") from the devicetree tree.

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

diff --cc arch/powerpc/sysdev/fsl_msi.c
index 8d6b074,ee6a8a5..0000000
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@@ -274,48 -273,23 +274,51 @@@ static int fsl_of_msi_remove(struct pla
  	return 0;
  }
  
 +static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
 +					 struct platform_device *dev,
 +					 int offset, int irq_index)
 +{
 +	struct fsl_msi_cascade_data *cascade_data = NULL;
 +	int virt_msir;
 +
 +	virt_msir = irq_of_parse_and_map(dev->dev.of_node, irq_index);
 +	if (virt_msir == NO_IRQ) {
 +		dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
 +			__func__, irq_index);
 +		return 0;
 +	}
 +
 +	cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
 +	if (!cascade_data) {
 +		dev_err(&dev->dev, "No memory for MSI cascade data\n");
 +		return -ENOMEM;
 +	}
 +
 +	msi->msi_virqs[irq_index] = virt_msir;
 +	cascade_data->index = offset + irq_index;
 +	cascade_data->msi_data = msi;
 +	set_irq_data(virt_msir, cascade_data);
 +	set_irq_chained_handler(virt_msir, fsl_msi_cascade);
 +
 +	return 0;
 +}
 +
- static int __devinit fsl_of_msi_probe(struct platform_device *dev,
- 				const struct of_device_id *match)
+ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
  {
  	struct fsl_msi *msi;
  	struct resource res;
 -	int err, i, count;
 +	int err, i, j, irq_index, count;
  	int rc;
 -	int virt_msir;
  	const u32 *p;
- 	struct fsl_msi_feature *features = match->data;
+ 	struct fsl_msi_feature *features;
 -	struct fsl_msi_cascade_data *cascade_data = NULL;
  	int len;
  	u32 offset;
 +	static const u32 all_avail[] = { 0, NR_MSI_IRQS };
  
+ 	if (!dev->dev.of_match)
+ 		return -EINVAL;
+ 	features = dev->dev.of_match->data;
+ 
  	printk(KERN_DEBUG "Setting up Freescale MSI support\n");
  
  	msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL);

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

* Re: linux-next: manual merge of the devicetree tree with the galak tree
  2011-03-16  4:46 linux-next: manual merge of the devicetree tree with the galak tree Stephen Rothwell
@ 2011-03-16  4:53 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2011-03-16  4:53 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Scott Wood, Kumar Gala

On Tue, Mar 15, 2011 at 10:46 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Grant,
>
> Today's linux-next merge of the devicetree tree got a conflict in
> arch/powerpc/sysdev/fsl_msi.c between commit 6820fead714d
> ("powerpc/fsl_msi: Handle msi-available-ranges better") from the galak
> tree and commit 000061245a67 ("dt/powerpc: Eliminate users of of_platform_
> {,un}register_driver") from the devicetree tree.
>
> I fixed it up (see below) and can carry the fix as necessary.

Looks correct to me.  Thanks Stephen.

g.

> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
>
> diff --cc arch/powerpc/sysdev/fsl_msi.c
> index 8d6b074,ee6a8a5..0000000
> --- a/arch/powerpc/sysdev/fsl_msi.c
> +++ b/arch/powerpc/sysdev/fsl_msi.c
> @@@ -274,48 -273,23 +274,51 @@@ static int fsl_of_msi_remove(struct pla
>        return 0;
>  }
>
>  +static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
>  +                                       struct platform_device *dev,
>  +                                       int offset, int irq_index)
>  +{
>  +      struct fsl_msi_cascade_data *cascade_data = NULL;
>  +      int virt_msir;
>  +
>  +      virt_msir = irq_of_parse_and_map(dev->dev.of_node, irq_index);
>  +      if (virt_msir == NO_IRQ) {
>  +              dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
>  +                      __func__, irq_index);
>  +              return 0;
>  +      }
>  +
>  +      cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
>  +      if (!cascade_data) {
>  +              dev_err(&dev->dev, "No memory for MSI cascade data\n");
>  +              return -ENOMEM;
>  +      }
>  +
>  +      msi->msi_virqs[irq_index] = virt_msir;
>  +      cascade_data->index = offset + irq_index;
>  +      cascade_data->msi_data = msi;
>  +      set_irq_data(virt_msir, cascade_data);
>  +      set_irq_chained_handler(virt_msir, fsl_msi_cascade);
>  +
>  +      return 0;
>  +}
>  +
> - static int __devinit fsl_of_msi_probe(struct platform_device *dev,
> -                               const struct of_device_id *match)
> + static int __devinit fsl_of_msi_probe(struct platform_device *dev)
>  {
>        struct fsl_msi *msi;
>        struct resource res;
>  -      int err, i, count;
>  +      int err, i, j, irq_index, count;
>        int rc;
>  -      int virt_msir;
>        const u32 *p;
> -       struct fsl_msi_feature *features = match->data;
> +       struct fsl_msi_feature *features;
>  -      struct fsl_msi_cascade_data *cascade_data = NULL;
>        int len;
>        u32 offset;
>  +      static const u32 all_avail[] = { 0, NR_MSI_IRQS };
>
> +       if (!dev->dev.of_match)
> +               return -EINVAL;
> +       features = dev->dev.of_match->data;
> +
>        printk(KERN_DEBUG "Setting up Freescale MSI support\n");
>
>        msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL);
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

end of thread, other threads:[~2011-03-16  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16  4:46 linux-next: manual merge of the devicetree tree with the galak tree Stephen Rothwell
2011-03-16  4:53 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®