diff options
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 78 |
1 files changed, 11 insertions, 67 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index db72a92943bf..a72bf5dceeee 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -53,9 +53,6 @@ | |||
53 | extern void platform_init(void); | 53 | extern void platform_init(void); |
54 | extern void bootx_init(unsigned long r4, unsigned long phys); | 54 | extern void bootx_init(unsigned long r4, unsigned long phys); |
55 | 55 | ||
56 | extern void ppc6xx_idle(void); | ||
57 | extern void power4_idle(void); | ||
58 | |||
59 | boot_infos_t *boot_infos; | 56 | boot_infos_t *boot_infos; |
60 | struct ide_machdep_calls ppc_ide_md; | 57 | struct ide_machdep_calls ppc_ide_md; |
61 | 58 | ||
@@ -70,10 +67,6 @@ unsigned int DMA_MODE_WRITE; | |||
70 | int have_of = 1; | 67 | int have_of = 1; |
71 | 68 | ||
72 | #ifdef CONFIG_PPC_MULTIPLATFORM | 69 | #ifdef CONFIG_PPC_MULTIPLATFORM |
73 | extern void prep_init(void); | ||
74 | extern void pmac_init(void); | ||
75 | extern void chrp_init(void); | ||
76 | |||
77 | dev_t boot_dev; | 70 | dev_t boot_dev; |
78 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 71 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
79 | 72 | ||
@@ -85,9 +78,6 @@ unsigned long SYSRQ_KEY = 0x54; | |||
85 | unsigned long vgacon_remap_base; | 78 | unsigned long vgacon_remap_base; |
86 | #endif | 79 | #endif |
87 | 80 | ||
88 | struct machdep_calls ppc_md; | ||
89 | EXPORT_SYMBOL(ppc_md); | ||
90 | |||
91 | /* | 81 | /* |
92 | * These are used in binfmt_elf.c to put aux entries on the stack | 82 | * These are used in binfmt_elf.c to put aux entries on the stack |
93 | * for each elf executable being started. | 83 | * for each elf executable being started. |
@@ -111,7 +101,7 @@ unsigned long __init early_init(unsigned long dt_ptr) | |||
111 | 101 | ||
112 | /* First zero the BSS -- use memset_io, some platforms don't have | 102 | /* First zero the BSS -- use memset_io, some platforms don't have |
113 | * caches on yet */ | 103 | * caches on yet */ |
114 | memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start); | 104 | memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, _end - __bss_start); |
115 | 105 | ||
116 | /* | 106 | /* |
117 | * Identify the CPU type and fix up code sections | 107 | * Identify the CPU type and fix up code sections |
@@ -123,48 +113,6 @@ unsigned long __init early_init(unsigned long dt_ptr) | |||
123 | return KERNELBASE + offset; | 113 | return KERNELBASE + offset; |
124 | } | 114 | } |
125 | 115 | ||
126 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
127 | /* | ||
128 | * The PPC_MULTIPLATFORM version of platform_init... | ||
129 | */ | ||
130 | void __init platform_init(void) | ||
131 | { | ||
132 | /* if we didn't get any bootinfo telling us what we are... */ | ||
133 | if (_machine == 0) { | ||
134 | /* prep boot loader tells us if we're prep or not */ | ||
135 | if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) ) | ||
136 | _machine = _MACH_prep; | ||
137 | } | ||
138 | |||
139 | #ifdef CONFIG_PPC_PREP | ||
140 | /* not much more to do here, if prep */ | ||
141 | if (_machine == _MACH_prep) { | ||
142 | prep_init(); | ||
143 | return; | ||
144 | } | ||
145 | #endif | ||
146 | |||
147 | #ifdef CONFIG_ADB | ||
148 | if (strstr(cmd_line, "adb_sync")) { | ||
149 | extern int __adb_probe_sync; | ||
150 | __adb_probe_sync = 1; | ||
151 | } | ||
152 | #endif /* CONFIG_ADB */ | ||
153 | |||
154 | switch (_machine) { | ||
155 | #ifdef CONFIG_PPC_PMAC | ||
156 | case _MACH_Pmac: | ||
157 | pmac_init(); | ||
158 | break; | ||
159 | #endif | ||
160 | #ifdef CONFIG_PPC_CHRP | ||
161 | case _MACH_chrp: | ||
162 | chrp_init(); | ||
163 | break; | ||
164 | #endif | ||
165 | } | ||
166 | } | ||
167 | #endif | ||
168 | 116 | ||
169 | /* | 117 | /* |
170 | * Find out what kind of machine we're on and save any data we need | 118 | * Find out what kind of machine we're on and save any data we need |
@@ -190,11 +138,17 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) | |||
190 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | 138 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); |
191 | #endif /* CONFIG_CMDLINE */ | 139 | #endif /* CONFIG_CMDLINE */ |
192 | 140 | ||
193 | /* Base init based on machine type */ | 141 | #ifdef CONFIG_PPC_MULTIPLATFORM |
142 | probe_machine(); | ||
143 | #else | ||
144 | /* Base init based on machine type. Obsoloete, please kill ! */ | ||
194 | platform_init(); | 145 | platform_init(); |
146 | #endif | ||
195 | 147 | ||
196 | #ifdef CONFIG_6xx | 148 | #ifdef CONFIG_6xx |
197 | ppc_md.power_save = ppc6xx_idle; | 149 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || |
150 | cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
151 | ppc_md.power_save = ppc6xx_idle; | ||
198 | #endif | 152 | #endif |
199 | 153 | ||
200 | if (ppc_md.progress) | 154 | if (ppc_md.progress) |
@@ -272,9 +226,8 @@ int __init ppc_init(void) | |||
272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 226 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
273 | 227 | ||
274 | /* register CPU devices */ | 228 | /* register CPU devices */ |
275 | for (i = 0; i < NR_CPUS; i++) | 229 | for_each_possible_cpu(i) |
276 | if (cpu_possible(i)) | 230 | register_cpu(&cpu_devices[i], i, NULL); |
277 | register_cpu(&cpu_devices[i], i, NULL); | ||
278 | 231 | ||
279 | /* call platform init */ | 232 | /* call platform init */ |
280 | if (ppc_md.init != NULL) { | 233 | if (ppc_md.init != NULL) { |
@@ -353,12 +306,6 @@ void __init setup_arch(char **cmdline_p) | |||
353 | do_init_bootmem(); | 306 | do_init_bootmem(); |
354 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); | 307 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); |
355 | 308 | ||
356 | #ifdef CONFIG_PPC_OCP | ||
357 | /* Initialize OCP device list */ | ||
358 | ocp_early_init(); | ||
359 | if ( ppc_md.progress ) ppc_md.progress("ocp: exit", 0x3eab); | ||
360 | #endif | ||
361 | |||
362 | #ifdef CONFIG_DUMMY_CONSOLE | 309 | #ifdef CONFIG_DUMMY_CONSOLE |
363 | conswitchp = &dummy_con; | 310 | conswitchp = &dummy_con; |
364 | #endif | 311 | #endif |
@@ -367,7 +314,4 @@ void __init setup_arch(char **cmdline_p) | |||
367 | if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab); | 314 | if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab); |
368 | 315 | ||
369 | paging_init(); | 316 | paging_init(); |
370 | |||
371 | /* this is for modules since _machine can be a define -- Cort */ | ||
372 | ppc_md.ppc_machine = _machine; | ||
373 | } | 317 | } |