aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/p1023_rds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/85xx/p1023_rds.c')
-rw-r--r--arch/powerpc/platforms/85xx/p1023_rds.c47
1 files changed, 6 insertions, 41 deletions
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c
index 835e0b335bfa..d951e7027bb6 100644
--- a/arch/powerpc/platforms/85xx/p1023_rds.c
+++ b/arch/powerpc/platforms/85xx/p1023_rds.c
@@ -30,19 +30,18 @@
30#include <asm/prom.h> 30#include <asm/prom.h>
31#include <asm/udbg.h> 31#include <asm/udbg.h>
32#include <asm/mpic.h> 32#include <asm/mpic.h>
33#include "smp.h"
33 34
34#include <sysdev/fsl_soc.h> 35#include <sysdev/fsl_soc.h>
35#include <sysdev/fsl_pci.h> 36#include <sysdev/fsl_pci.h>
36 37
38#include "mpc85xx.h"
39
37/* ************************************************************************ 40/* ************************************************************************
38 * 41 *
39 * Setup the architecture 42 * Setup the architecture
40 * 43 *
41 */ 44 */
42#ifdef CONFIG_SMP
43void __init mpc85xx_smp_init(void);
44#endif
45
46static void __init mpc85xx_rds_setup_arch(void) 45static void __init mpc85xx_rds_setup_arch(void)
47{ 46{
48 struct device_node *np; 47 struct device_node *np;
@@ -87,53 +86,19 @@ static void __init mpc85xx_rds_setup_arch(void)
87 fsl_add_bridge(np, 0); 86 fsl_add_bridge(np, 0);
88#endif 87#endif
89 88
90#ifdef CONFIG_SMP
91 mpc85xx_smp_init(); 89 mpc85xx_smp_init();
92#endif
93}
94
95static struct of_device_id p1023_ids[] = {
96 { .type = "soc", },
97 { .compatible = "soc", },
98 { .compatible = "simple-bus", },
99 {},
100};
101
102
103static int __init p1023_publish_devices(void)
104{
105 of_platform_bus_probe(NULL, p1023_ids, NULL);
106
107 return 0;
108} 90}
109 91
110machine_device_initcall(p1023_rds, p1023_publish_devices); 92machine_device_initcall(p1023_rds, mpc85xx_common_publish_devices);
111 93
112static void __init mpc85xx_rds_pic_init(void) 94static void __init mpc85xx_rds_pic_init(void)
113{ 95{
114 struct mpic *mpic; 96 struct mpic *mpic = mpic_alloc(NULL, 0,
115 struct resource r; 97 MPIC_WANTS_RESET | MPIC_BIG_ENDIAN |
116 struct device_node *np = NULL;
117
118 np = of_find_node_by_type(NULL, "open-pic");
119 if (!np) {
120 printk(KERN_ERR "Could not find open-pic node\n");
121 return;
122 }
123
124 if (of_address_to_resource(np, 0, &r)) {
125 printk(KERN_ERR "Failed to map mpic register space\n");
126 of_node_put(np);
127 return;
128 }
129
130 mpic = mpic_alloc(np, r.start,
131 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN |
132 MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU, 98 MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU,
133 0, 256, " OpenPIC "); 99 0, 256, " OpenPIC ");
134 100
135 BUG_ON(mpic == NULL); 101 BUG_ON(mpic == NULL);
136 of_node_put(np);
137 102
138 mpic_init(mpic); 103 mpic_init(mpic);
139} 104}