diff options
author | Prabhakar Kushwaha <prabhakar@freescale.com> | 2012-09-13 04:04:11 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2012-09-19 09:41:22 -0400 |
commit | 721c0705906e2ba69907fd2ca837bec6b6a8dbcb (patch) | |
tree | ff34fdf1efa8bc2dc6131174e47f42ff17ca46a3 /arch/powerpc/sysdev/fsl_ifc.c | |
parent | 1919aac36c2472ad010102661d5aa6d55f0d66a4 (diff) |
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>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_ifc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_ifc.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/arch/powerpc/sysdev/fsl_ifc.c index b31f19f61031..097cc9d2585b 100644 --- a/arch/powerpc/sysdev/fsl_ifc.c +++ b/arch/powerpc/sysdev/fsl_ifc.c | |||
@@ -244,12 +244,6 @@ static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev) | |||
244 | /* get the nand machine irq */ | 244 | /* get the nand machine irq */ |
245 | fsl_ifc_ctrl_dev->nand_irq = | 245 | fsl_ifc_ctrl_dev->nand_irq = |
246 | irq_of_parse_and_map(dev->dev.of_node, 1); | 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 | fsl_ifc_ctrl_dev->dev = &dev->dev; | 248 | fsl_ifc_ctrl_dev->dev = &dev->dev; |
255 | 249 | ||
@@ -267,12 +261,14 @@ static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev) | |||
267 | goto err_irq; | 261 | goto err_irq; |
268 | } | 262 | } |
269 | 263 | ||
270 | ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, 0, | 264 | if (fsl_ifc_ctrl_dev->nand_irq) { |
271 | "fsl-ifc-nand", fsl_ifc_ctrl_dev); | 265 | ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, |
272 | if (ret != 0) { | 266 | 0, "fsl-ifc-nand", fsl_ifc_ctrl_dev); |
273 | dev_err(&dev->dev, "failed to install irq (%d)\n", | 267 | if (ret != 0) { |
274 | fsl_ifc_ctrl_dev->nand_irq); | 268 | dev_err(&dev->dev, "failed to install irq (%d)\n", |
275 | goto err_nandirq; | 269 | fsl_ifc_ctrl_dev->nand_irq); |
270 | goto err_nandirq; | ||
271 | } | ||
276 | } | 272 | } |
277 | 273 | ||
278 | return 0; | 274 | return 0; |