diff options
Diffstat (limited to 'arch/powerpc/platforms/85xx/common.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/common.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/85xx/common.c b/arch/powerpc/platforms/85xx/common.c index eba78c85303f..3b085c7ee539 100644 --- a/arch/powerpc/platforms/85xx/common.c +++ b/arch/powerpc/platforms/85xx/common.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/of_irq.h> | 9 | #include <linux/of_irq.h> |
10 | #include <linux/of_platform.h> | 10 | #include <linux/of_platform.h> |
11 | 11 | ||
12 | #include <asm/qe.h> | ||
12 | #include <sysdev/cpm2_pic.h> | 13 | #include <sysdev/cpm2_pic.h> |
13 | 14 | ||
14 | #include "mpc85xx.h" | 15 | #include "mpc85xx.h" |
@@ -82,3 +83,40 @@ void __init mpc85xx_cpm2_pic_init(void) | |||
82 | irq_set_chained_handler(irq, cpm2_cascade); | 83 | irq_set_chained_handler(irq, cpm2_cascade); |
83 | } | 84 | } |
84 | #endif | 85 | #endif |
86 | |||
87 | #ifdef CONFIG_QUICC_ENGINE | ||
88 | void __init mpc85xx_qe_init(void) | ||
89 | { | ||
90 | struct device_node *np; | ||
91 | |||
92 | np = of_find_compatible_node(NULL, NULL, "fsl,qe"); | ||
93 | if (!np) { | ||
94 | np = of_find_node_by_name(NULL, "qe"); | ||
95 | if (!np) { | ||
96 | pr_err("%s: Could not find Quicc Engine node\n", | ||
97 | __func__); | ||
98 | return; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | if (!of_device_is_available(np)) { | ||
103 | of_node_put(np); | ||
104 | return; | ||
105 | } | ||
106 | |||
107 | qe_reset(); | ||
108 | of_node_put(np); | ||
109 | |||
110 | np = of_find_node_by_name(NULL, "par_io"); | ||
111 | if (np) { | ||
112 | struct device_node *ucc; | ||
113 | |||
114 | par_io_init(np); | ||
115 | of_node_put(np); | ||
116 | |||
117 | for_each_node_by_name(ucc, "ucc") | ||
118 | par_io_of_config(ucc); | ||
119 | |||
120 | } | ||
121 | } | ||
122 | #endif | ||