diff options
Diffstat (limited to 'arch/powerpc/platforms/85xx/xes_mpc85xx.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/xes_mpc85xx.c | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c index a9dc5e795123..3a69f8b77de6 100644 --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c | |||
@@ -32,6 +32,9 @@ | |||
32 | 32 | ||
33 | #include <sysdev/fsl_soc.h> | 33 | #include <sysdev/fsl_soc.h> |
34 | #include <sysdev/fsl_pci.h> | 34 | #include <sysdev/fsl_pci.h> |
35 | #include "smp.h" | ||
36 | |||
37 | #include "mpc85xx.h" | ||
35 | 38 | ||
36 | /* A few bit definitions needed for fixups on some boards */ | 39 | /* A few bit definitions needed for fixups on some boards */ |
37 | #define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */ | 40 | #define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */ |
@@ -40,29 +43,11 @@ | |||
40 | 43 | ||
41 | void __init xes_mpc85xx_pic_init(void) | 44 | void __init xes_mpc85xx_pic_init(void) |
42 | { | 45 | { |
43 | struct mpic *mpic; | 46 | struct mpic *mpic = mpic_alloc(NULL, 0, |
44 | struct resource r; | 47 | MPIC_WANTS_RESET | |
45 | struct device_node *np; | ||
46 | |||
47 | np = of_find_node_by_type(NULL, "open-pic"); | ||
48 | if (np == NULL) { | ||
49 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
50 | return; | ||
51 | } | ||
52 | |||
53 | if (of_address_to_resource(np, 0, &r)) { | ||
54 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
55 | of_node_put(np); | ||
56 | return; | ||
57 | } | ||
58 | |||
59 | mpic = mpic_alloc(np, r.start, | ||
60 | MPIC_PRIMARY | MPIC_WANTS_RESET | | ||
61 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | 48 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, |
62 | 0, 256, " OpenPIC "); | 49 | 0, 256, " OpenPIC "); |
63 | BUG_ON(mpic == NULL); | 50 | BUG_ON(mpic == NULL); |
64 | of_node_put(np); | ||
65 | |||
66 | mpic_init(mpic); | 51 | mpic_init(mpic); |
67 | } | 52 | } |
68 | 53 | ||
@@ -136,9 +121,6 @@ static int primary_phb_addr; | |||
136 | /* | 121 | /* |
137 | * Setup the architecture | 122 | * Setup the architecture |
138 | */ | 123 | */ |
139 | #ifdef CONFIG_SMP | ||
140 | extern void __init mpc85xx_smp_init(void); | ||
141 | #endif | ||
142 | static void __init xes_mpc85xx_setup_arch(void) | 124 | static void __init xes_mpc85xx_setup_arch(void) |
143 | { | 125 | { |
144 | #ifdef CONFIG_PCI | 126 | #ifdef CONFIG_PCI |
@@ -172,26 +154,12 @@ static void __init xes_mpc85xx_setup_arch(void) | |||
172 | } | 154 | } |
173 | #endif | 155 | #endif |
174 | 156 | ||
175 | #ifdef CONFIG_SMP | ||
176 | mpc85xx_smp_init(); | 157 | mpc85xx_smp_init(); |
177 | #endif | ||
178 | } | 158 | } |
179 | 159 | ||
180 | static struct of_device_id __initdata xes_mpc85xx_ids[] = { | 160 | machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices); |
181 | { .type = "soc", }, | 161 | machine_device_initcall(xes_mpc8548, mpc85xx_common_publish_devices); |
182 | { .compatible = "soc", }, | 162 | machine_device_initcall(xes_mpc8540, mpc85xx_common_publish_devices); |
183 | { .compatible = "simple-bus", }, | ||
184 | { .compatible = "gianfar", }, | ||
185 | {}, | ||
186 | }; | ||
187 | |||
188 | static int __init xes_mpc85xx_publish_devices(void) | ||
189 | { | ||
190 | return of_platform_bus_probe(NULL, xes_mpc85xx_ids, NULL); | ||
191 | } | ||
192 | machine_device_initcall(xes_mpc8572, xes_mpc85xx_publish_devices); | ||
193 | machine_device_initcall(xes_mpc8548, xes_mpc85xx_publish_devices); | ||
194 | machine_device_initcall(xes_mpc8540, xes_mpc85xx_publish_devices); | ||
195 | 163 | ||
196 | /* | 164 | /* |
197 | * Called very early, device-tree isn't unflattened | 165 | * Called very early, device-tree isn't unflattened |