aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-04-01 06:08:26 -0500
committerPaul Mackerras <paulus@samba.org>2006-04-01 06:08:26 -0500
commitf18dd516d433d0b740aa8365d706f5ad47603449 (patch)
tree0982ab6ddb1c7c01da258dfe9b294428c8231387 /arch/powerpc
parent683aa4012f53b2ada0f430487e05d37b0d94e90a (diff)
parent72d2c3e038fb4846e32cf3f6d66ebd1013329986 (diff)
Merge branch 'for_paulus' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/setup_32.c6
-rw-r--r--arch/powerpc/kernel/traps.c9
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.c40
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c40
4 files changed, 43 insertions, 52 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a72bf5dceeee..69ac25701344 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -50,7 +50,6 @@
50#include <asm/kgdb.h> 50#include <asm/kgdb.h>
51#endif 51#endif
52 52
53extern void platform_init(void);
54extern void bootx_init(unsigned long r4, unsigned long phys); 53extern void bootx_init(unsigned long r4, unsigned long phys);
55 54
56boot_infos_t *boot_infos; 55boot_infos_t *boot_infos;
@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
138 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); 137 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
139#endif /* CONFIG_CMDLINE */ 138#endif /* CONFIG_CMDLINE */
140 139
141#ifdef CONFIG_PPC_MULTIPLATFORM
142 probe_machine(); 140 probe_machine();
143#else
144 /* Base init based on machine type. Obsoloete, please kill ! */
145 platform_init();
146#endif
147 141
148#ifdef CONFIG_6xx 142#ifdef CONFIG_6xx
149 if (cpu_has_feature(CPU_FTR_CAN_DOZE) || 143 if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 4cbde211eb69..064a52564692 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
228 */ 228 */
229static inline int check_io_access(struct pt_regs *regs) 229static inline int check_io_access(struct pt_regs *regs)
230{ 230{
231#ifdef CONFIG_PPC_PMAC 231#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
232 unsigned long msr = regs->msr; 232 unsigned long msr = regs->msr;
233 const struct exception_table_entry *entry; 233 const struct exception_table_entry *entry;
234 unsigned int *nip = (unsigned int *)regs->nip; 234 unsigned int *nip = (unsigned int *)regs->nip;
@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
261 return 1; 261 return 1;
262 } 262 }
263 } 263 }
264#endif /* CONFIG_PPC_PMAC */ 264#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
265 return 0; 265 return 0;
266} 266}
267 267
@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs)
308 308
309void machine_check_exception(struct pt_regs *regs) 309void machine_check_exception(struct pt_regs *regs)
310{ 310{
311#ifdef CONFIG_PPC64
312 int recover = 0; 311 int recover = 0;
312 unsigned long reason = get_mc_reason(regs);
313 313
314 /* See if any machine dependent calls */ 314 /* See if any machine dependent calls */
315 if (ppc_md.machine_check_exception) 315 if (ppc_md.machine_check_exception)
@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs)
317 317
318 if (recover) 318 if (recover)
319 return; 319 return;
320#else
321 unsigned long reason = get_mc_reason(regs);
322 320
323 if (user_mode(regs)) { 321 if (user_mode(regs)) {
324 regs->msr |= MSR_RI; 322 regs->msr |= MSR_RI;
@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
462 * additional info, e.g. bus error registers. 460 * additional info, e.g. bus error registers.
463 */ 461 */
464 platform_machine_check(regs); 462 platform_machine_check(regs);
465#endif /* CONFIG_PPC64 */
466 463
467 if (debugger_fault_handler(regs)) 464 if (debugger_fault_handler(regs))
468 return; 465 return;
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c
index 7c18b4cd5db4..7e789d2420ba 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c
@@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void)
158late_initcall(mpc834x_rtc_hookup); 158late_initcall(mpc834x_rtc_hookup);
159#endif 159#endif
160 160
161void __init platform_init(void) 161/*
162 * Called very early, MMU is off, device-tree isn't unflattened
163 */
164static int __init mpc834x_sys_probe(void)
162{ 165{
163 /* setup the PowerPC module struct */ 166 /* We always match for now, eventually we should look at the flat
164 ppc_md.setup_arch = mpc834x_sys_setup_arch; 167 dev tree to ensure this is the board we are suppose to run on
165 168 */
166 ppc_md.init_IRQ = mpc834x_sys_init_IRQ; 169 return 1;
167 ppc_md.get_irq = ipic_get_irq;
168
169 ppc_md.restart = mpc83xx_restart;
170
171 ppc_md.time_init = mpc83xx_time_init;
172 ppc_md.set_rtc_time = NULL;
173 ppc_md.get_rtc_time = NULL;
174 ppc_md.calibrate_decr = generic_calibrate_decr;
175
176 ppc_md.progress = udbg_progress;
177
178 if (ppc_md.progress)
179 ppc_md.progress("mpc834x_sys_init(): exit", 0);
180
181 return;
182} 170}
171
172define_machine(mpc834x_sys) {
173 .name = "MPC834x SYS",
174 .probe = mpc834x_sys_probe,
175 .setup_arch = mpc834x_sys_setup_arch,
176 .init_IRQ = mpc834x_sys_init_IRQ,
177 .get_irq = ipic_get_irq,
178 .restart = mpc83xx_restart,
179 .time_init = mpc83xx_time_init,
180 .calibrate_decr = generic_calibrate_decr,
181 .progress = udbg_progress,
182};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index b7821dbae00d..5eeff370f5fc 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); 220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
221} 221}
222 222
223void __init platform_init(void) 223/*
224 * Called very early, device-tree isn't unflattened
225 */
226static int __init mpc85xx_ads_probe(void)
224{ 227{
225 ppc_md.setup_arch = mpc85xx_ads_setup_arch; 228 /* We always match for now, eventually we should look at the flat
226 ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; 229 dev tree to ensure this is the board we are suppose to run on
227 230 */
228 ppc_md.init_IRQ = mpc85xx_ads_pic_init; 231 return 1;
229 ppc_md.get_irq = mpic_get_irq;
230
231 ppc_md.restart = mpc85xx_restart;
232 ppc_md.power_off = NULL;
233 ppc_md.halt = NULL;
234
235 ppc_md.time_init = NULL;
236 ppc_md.set_rtc_time = NULL;
237 ppc_md.get_rtc_time = NULL;
238 ppc_md.calibrate_decr = generic_calibrate_decr;
239
240 ppc_md.progress = udbg_progress;
241
242 if (ppc_md.progress)
243 ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
244} 232}
233
234define_machine(mpc85xx_ads) {
235 .name = "MPC85xx ADS",
236 .probe = mpc85xx_ads_probe,
237 .setup_arch = mpc85xx_ads_setup_arch,
238 .init_IRQ = mpc85xx_ads_pic_init,
239 .show_cpuinfo = mpc85xx_ads_show_cpuinfo,
240 .get_irq = mpic_get_irq,
241 .restart = mpc85xx_restart,
242 .calibrate_decr = generic_calibrate_decr,
243 .progress = udbg_progress,
244};