Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Prabhakar Kushwaha and committed by
Kumar Gala
721c0705 1919aac3

+8 -12
+8 -12
arch/powerpc/sysdev/fsl_ifc.c
··· 244 244 /* get the nand machine irq */ 245 245 fsl_ifc_ctrl_dev->nand_irq = 246 246 irq_of_parse_and_map(dev->dev.of_node, 1); 247 - if (fsl_ifc_ctrl_dev->nand_irq == NO_IRQ) { 248 - dev_err(&dev->dev, "failed to get irq resource " 249 - "for NAND Machine\n"); 250 - ret = -ENODEV; 251 - goto err; 252 - } 253 247 254 248 fsl_ifc_ctrl_dev->dev = &dev->dev; 255 249 ··· 261 267 goto err_irq; 262 268 } 263 269 264 - ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, 0, 265 - "fsl-ifc-nand", fsl_ifc_ctrl_dev); 266 - if (ret != 0) { 267 - dev_err(&dev->dev, "failed to install irq (%d)\n", 268 - fsl_ifc_ctrl_dev->nand_irq); 269 - goto err_nandirq; 270 + if (fsl_ifc_ctrl_dev->nand_irq) { 271 + ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, 272 + 0, "fsl-ifc-nand", fsl_ifc_ctrl_dev); 273 + if (ret != 0) { 274 + dev_err(&dev->dev, "failed to install irq (%d)\n", 275 + fsl_ifc_ctrl_dev->nand_irq); 276 + goto err_nandirq; 277 + } 270 278 } 271 279 272 280 return 0;