aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashmica Gupta <rashmicy@gmail.com>2016-05-30 02:18:15 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-13 23:58:27 -0400
commitac9cd1709c0be4334fbad4ab610ecb7acceac884 (patch)
treed78d689645e19c06e2146223eda73273195822fa
parent8324947d6d318fbcf558d50ae348a85aacd68930 (diff)
powerpc/pseries: Remove MPIC from pseries event sources
MPIC was only used by Power3 which is now unsupported, so remove MPIC code. XICS is now the only supported interrupt controller for pSeries so do some cleanups too. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/platforms/pseries/event_sources.c53
1 files changed, 13 insertions, 40 deletions
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c
index 18380e8f6dfe..a6ddca833119 100644
--- a/arch/powerpc/platforms/pseries/event_sources.c
+++ b/arch/powerpc/platforms/pseries/event_sources.c
@@ -26,48 +26,21 @@ void request_event_sources_irqs(struct device_node *np,
26{ 26{
27 int i, index, count = 0; 27 int i, index, count = 0;
28 struct of_phandle_args oirq; 28 struct of_phandle_args oirq;
29 const u32 *opicprop;
30 unsigned int opicplen;
31 unsigned int virqs[16]; 29 unsigned int virqs[16];
32 30
33 /* Check for obsolete "open-pic-interrupt" property. If present, then 31 /* First try to do a proper OF tree parsing */
34 * map those interrupts using the default interrupt host and default 32 for (index = 0; of_irq_parse_one(np, index, &oirq) == 0;
35 * trigger 33 index++) {
36 */ 34 if (count > 15)
37 opicprop = of_get_property(np, "open-pic-interrupt", &opicplen); 35 break;
38 if (opicprop) { 36 virqs[count] = irq_create_of_mapping(&oirq);
39 opicplen /= sizeof(u32); 37 if (virqs[count] == NO_IRQ) {
40 for (i = 0; i < opicplen; i++) { 38 pr_err("event-sources: Unable to allocate "
41 if (count > 15) 39 "interrupt number for %s\n",
42 break; 40 np->full_name);
43 virqs[count] = irq_create_mapping(NULL, *(opicprop++)); 41 WARN_ON(1);
44 if (virqs[count] == NO_IRQ) { 42 } else {
45 pr_err("event-sources: Unable to allocate " 43 count++;
46 "interrupt number for %s\n",
47 np->full_name);
48 WARN_ON(1);
49 }
50 else
51 count++;
52
53 }
54 }
55 /* Else use normal interrupt tree parsing */
56 else {
57 /* First try to do a proper OF tree parsing */
58 for (index = 0; of_irq_parse_one(np, index, &oirq) == 0;
59 index++) {
60 if (count > 15)
61 break;
62 virqs[count] = irq_create_of_mapping(&oirq);
63 if (virqs[count] == NO_IRQ) {
64 pr_err("event-sources: Unable to allocate "
65 "interrupt number for %s\n",
66 np->full_name);
67 WARN_ON(1);
68 }
69 else
70 count++;
71 } 44 }
72 } 45 }
73 46