Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 611cd90c authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras
Browse files

powerpc: fsl_msi doesn't need it's own of_node



The FSL MSI code keeps a pointer to the of_node from the device
it represents.  However it also has an irq_host, which contains
a pointer to the of_node, so use that one instead.

Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent dcfcfe75
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -108,7 +108,8 @@ static int fsl_msi_free_dt_hwirqs(struct fsl_msi *msi)
	bitmap_allocate_region(msi->fsl_msi_bitmap, 0,
	bitmap_allocate_region(msi->fsl_msi_bitmap, 0,
		       get_count_order(NR_MSI_IRQS));
		       get_count_order(NR_MSI_IRQS));


	p = of_get_property(msi->of_node, "msi-available-ranges", &len);
	p = of_get_property(msi->irqhost->of_node, "msi-available-ranges",
			    &len);


	if (!p) {
	if (!p) {
		/* No msi-available-ranges property,
		/* No msi-available-ranges property,
@@ -120,7 +121,7 @@ static int fsl_msi_free_dt_hwirqs(struct fsl_msi *msi)


	if ((len % (2 * sizeof(u32))) != 0) {
	if ((len % (2 * sizeof(u32))) != 0) {
		printk(KERN_WARNING "fsl_msi: Malformed msi-available-ranges "
		printk(KERN_WARNING "fsl_msi: Malformed msi-available-ranges "
		       "property on %s\n", msi->of_node->full_name);
		       "property on %s\n", msi->irqhost->of_node->full_name);
		return -EINVAL;
		return -EINVAL;
	}
	}


@@ -317,14 +318,11 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
		goto error_out;
		goto error_out;
	}
	}


	msi->of_node = of_node_get(dev->node);
	msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR,

	msi->irqhost = irq_alloc_host(of_node_get(dev->node),
				IRQ_HOST_MAP_LINEAR,
				      NR_MSI_IRQS, &fsl_msi_host_ops, 0);
				      NR_MSI_IRQS, &fsl_msi_host_ops, 0);

	if (msi->irqhost == NULL) {
	if (msi->irqhost == NULL) {
		dev_err(&dev->dev, "No memory for MSI irqhost\n");
		dev_err(&dev->dev, "No memory for MSI irqhost\n");
		of_node_put(dev->node);
		err = -ENOMEM;
		err = -ENOMEM;
		goto error_out;
		goto error_out;
	}
	}
+0 −3
Original line number Original line Diff line number Diff line
@@ -22,9 +22,6 @@
#define FSL_PIC_IP_IPIC	0x00000002
#define FSL_PIC_IP_IPIC	0x00000002


struct fsl_msi {
struct fsl_msi {
	/* Device node of the MSI interrupt*/
	struct device_node *of_node;

	struct irq_host *irqhost;
	struct irq_host *irqhost;


	unsigned long cascade_irq;
	unsigned long cascade_irq;