aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 10:40:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 10:40:55 -0400
commit44d84afa834b799560d7dbe47250ad7557f5ca2f (patch)
treed18b90078503c956d32f9f0c6524bc43ece96b25 /arch/powerpc/sysdev/mpic.c
parentf8201abcb2badce7eaa6a3715f9a228cfd88a453 (diff)
parent11b55da700eb77905f1c2dde3a0cbeedc665a753 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (28 commits) powerpc: Fix oops when loading modules powerpc: Wire up preadv and pwritev powerpc/ftrace: Fix printf format warning powerpc/ftrace: Fix #if that should be #ifdef powerpc: Fix ptrace compat wrapper for FPU register access powerpc: Print information about mapping hw irqs to virtual irqs powerpc: Correct dependency of KEXEC powerpc: Disable VSX or current process in giveup_fpu/altivec powerpc/pseries: Enable relay in pseries_defconfig powerpc/pseries: Fix ibm,client-architecture comment powerpc/pseries: Scan for all events in rtasd powerpc/pseries: Add dispatch dispersion statistics powerpc: Clean up some prom printouts powerpc: Print progress of ibm,client-architecture method powerpc: Remove duplicated #include's powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBook powerpc/wdrtas: Update wdrtas_get_interval to use rtas_data_buf fsl-diu-fb: Pass the proper device for dma mapping routines powerpc/pq2fads: Update device tree for use with device-tree-aware u-boot. cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console. ...
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 532e205303a2..21b956701596 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1170,6 +1170,12 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1170 mb(); 1170 mb();
1171 } 1171 }
1172 1172
1173 /* CoreInt */
1174 if (flags & MPIC_ENABLE_COREINT)
1175 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1176 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1177 | MPIC_GREG_GCONF_COREINT);
1178
1173 if (flags & MPIC_ENABLE_MCK) 1179 if (flags & MPIC_ENABLE_MCK)
1174 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), 1180 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1175 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) 1181 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
@@ -1525,6 +1531,34 @@ unsigned int mpic_get_irq(void)
1525 return mpic_get_one_irq(mpic); 1531 return mpic_get_one_irq(mpic);
1526} 1532}
1527 1533
1534unsigned int mpic_get_coreint_irq(void)
1535{
1536#ifdef CONFIG_BOOKE
1537 struct mpic *mpic = mpic_primary;
1538 u32 src;
1539
1540 BUG_ON(mpic == NULL);
1541
1542 src = mfspr(SPRN_EPR);
1543
1544 if (unlikely(src == mpic->spurious_vec)) {
1545 if (mpic->flags & MPIC_SPV_EOI)
1546 mpic_eoi(mpic);
1547 return NO_IRQ;
1548 }
1549 if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
1550 if (printk_ratelimit())
1551 printk(KERN_WARNING "%s: Got protected source %d !\n",
1552 mpic->name, (int)src);
1553 return NO_IRQ;
1554 }
1555
1556 return irq_linear_revmap(mpic->irqhost, src);
1557#else
1558 return NO_IRQ;
1559#endif
1560}
1561
1528unsigned int mpic_get_mcirq(void) 1562unsigned int mpic_get_mcirq(void)
1529{ 1563{
1530 struct mpic *mpic = mpic_primary; 1564 struct mpic *mpic = mpic_primary;