Skip to contentSkip to conversation

powerpc/mpc85xx:Update interrupt handling for IFC controller

PATCH Applied Prabhakar Kushwaha 2 participants 2 messages Sep 13, 2012 – Sep 19, 2012 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mpc85xx:Update interrupt handling for IFC controller

IFC may have one or two interrupts. If two interrupt specifiers are present, the first is the "common" interrupt (CM_EVTER_STAT), and the second is the NAND interrupt (NAND_EVTER_STAT).
If there is only one, that interrupt reports both types of event.

---
Based upon git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git branch next

 arch/powerpc/sysdev/fsl_ifc.c |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/powerpc/sysdev/fsl_ifc.c +8 -12
index b31f19f..097cc9d2 100644
@@ -244,12 +244,6 @@ static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev)
 	/* get the nand machine irq */
 	fsl_ifc_ctrl_dev->nand_irq =
 			irq_of_parse_and_map(dev->dev.of_node, 1);
-	if (fsl_ifc_ctrl_dev->nand_irq == NO_IRQ) {
-		dev_err(&dev->dev, "failed to get irq resource "
-						"for NAND Machine\n");
-		ret = -ENODEV;
-		goto err;
-	}
 
 	fsl_ifc_ctrl_dev->dev = &dev->dev;
 
@@ -267,12 +261,14 @@ static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev)
 		goto err_irq;
 	}
 
-	ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, 0,
-			  "fsl-ifc-nand", fsl_ifc_ctrl_dev);
-	if (ret != 0) {
-		dev_err(&dev->dev, "failed to install irq (%d)\n",
-			fsl_ifc_ctrl_dev->nand_irq);
-		goto err_nandirq;
+	if (fsl_ifc_ctrl_dev->nand_irq) {
+		ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq,
+				0, "fsl-ifc-nand", fsl_ifc_ctrl_dev);
+		if (ret != 0) {
+			dev_err(&dev->dev, "failed to install irq (%d)\n",
+				fsl_ifc_ctrl_dev->nand_irq);
+			goto err_nandirq;
+		}
 	}
 
 	return 0;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 1 line · Prabhakar Kushwaha

IFC may have one or two interrupts. If two interrupt specifiers are =

present,

Quoted 1 line

the first is the "common" interrupt (CM_EVTER_STAT), and the second is =

the NAND

Quoted 6 lines

interrupt (NAND_EVTER_STAT).
If there is only one, that interrupt reports both types of event. =20

---
Based upon =

git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git branch = next=20

Quoted 3 lines

=20
arch/powerpc/sysdev/fsl_ifc.c | 20 ++++++++------------

1 file changed, 8 insertions(+), 12 deletions(-)

applied to next

- k=