aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/mpc85xx_ads.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc85xx_ads.c')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 3b2c9bb6619..8b8f7a20116 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -35,6 +35,8 @@
35#include <sysdev/cpm2_pic.h> 35#include <sysdev/cpm2_pic.h>
36#endif 36#endif
37 37
38#include "mpc85xx.h"
39
38#ifdef CONFIG_PCI 40#ifdef CONFIG_PCI
39static int mpc85xx_exclude_device(struct pci_controller *hose, 41static int mpc85xx_exclude_device(struct pci_controller *hose,
40 u_char bus, u_char devfn) 42 u_char bus, u_char devfn)
@@ -46,29 +48,11 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
46} 48}
47#endif /* CONFIG_PCI */ 49#endif /* CONFIG_PCI */
48 50
49#ifdef CONFIG_CPM2
50
51static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
52{
53 struct irq_chip *chip = irq_desc_get_chip(desc);
54 int cascade_irq;
55
56 while ((cascade_irq = cpm2_get_irq()) >= 0)
57 generic_handle_irq(cascade_irq);
58
59 chip->irq_eoi(&desc->irq_data);
60}
61
62#endif /* CONFIG_CPM2 */
63
64static void __init mpc85xx_ads_pic_init(void) 51static void __init mpc85xx_ads_pic_init(void)
65{ 52{
66 struct mpic *mpic; 53 struct mpic *mpic;
67 struct resource r; 54 struct resource r;
68 struct device_node *np = NULL; 55 struct device_node *np = NULL;
69#ifdef CONFIG_CPM2
70 int irq;
71#endif
72 56
73 np = of_find_node_by_type(np, "open-pic"); 57 np = of_find_node_by_type(np, "open-pic");
74 if (!np) { 58 if (!np) {
@@ -90,19 +74,7 @@ static void __init mpc85xx_ads_pic_init(void)
90 74
91 mpic_init(mpic); 75 mpic_init(mpic);
92 76
93#ifdef CONFIG_CPM2 77 mpc85xx_cpm2_pic_init();
94 /* Setup CPM2 PIC */
95 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
96 if (np == NULL) {
97 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
98 return;
99 }
100 irq = irq_of_parse_and_map(np, 0);
101
102 cpm2_pic_init(np);
103 of_node_put(np);
104 irq_set_chained_handler(irq, cpm2_cascade);
105#endif
106} 78}
107 79
108/* 80/*