aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/setup.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-01-15 01:30:44 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-15 01:30:44 -0500
commita7fdd90bc43e3e9cb08bc1b13650024d419b89e5 (patch)
tree5c99a41b9d157186668ed63c001f72a09965143b /arch/ppc/kernel/setup.c
parente8625d463560198cff7cb3eb22886c47d728d501 (diff)
[PATCH] ppc: Remove powermac support from ARCH=ppc
This makes it possible to build kernels for PReP and/or CHRP with ARCH=ppc by removing the (non-building) powermac support. It's now also possible to select PReP and CHRP independently. Powermac users should now build with ARCH=powerpc instead of ARCH=ppc. (This does mean that it is no longer possible to build a 32-bit kernel for a G5.) Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel/setup.c')
-rw-r--r--arch/ppc/kernel/setup.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index e707c6f6e61b..c08ab432e958 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Common prep/pmac/chrp boot and setup code. 2 * Common prep/chrp boot and setup code.
3 */ 3 */
4 4
5#include <linux/config.h> 5#include <linux/config.h>
@@ -35,7 +35,6 @@
35#include <asm/machdep.h> 35#include <asm/machdep.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/system.h> 37#include <asm/system.h>
38#include <asm/pmac_feature.h>
39#include <asm/sections.h> 38#include <asm/sections.h>
40#include <asm/nvram.h> 39#include <asm/nvram.h>
41#include <asm/xmon.h> 40#include <asm/xmon.h>
@@ -55,7 +54,6 @@
55 54
56extern void platform_init(unsigned long r3, unsigned long r4, 55extern void platform_init(unsigned long r3, unsigned long r4,
57 unsigned long r5, unsigned long r6, unsigned long r7); 56 unsigned long r5, unsigned long r6, unsigned long r7);
58extern void bootx_init(unsigned long r4, unsigned long phys);
59extern void identify_cpu(unsigned long offset, unsigned long cpu); 57extern void identify_cpu(unsigned long offset, unsigned long cpu);
60extern void do_cpu_ftr_fixups(unsigned long offset); 58extern void do_cpu_ftr_fixups(unsigned long offset);
61extern void reloc_got2(unsigned long offset); 59extern void reloc_got2(unsigned long offset);
@@ -80,8 +78,6 @@ EXPORT_SYMBOL(_machine);
80 78
81extern void prep_init(unsigned long r3, unsigned long r4, 79extern void prep_init(unsigned long r3, unsigned long r4,
82 unsigned long r5, unsigned long r6, unsigned long r7); 80 unsigned long r5, unsigned long r6, unsigned long r7);
83extern void pmac_init(unsigned long r3, unsigned long r4,
84 unsigned long r5, unsigned long r6, unsigned long r7);
85extern void chrp_init(unsigned long r3, unsigned long r4, 81extern void chrp_init(unsigned long r3, unsigned long r4,
86 unsigned long r5, unsigned long r6, unsigned long r7); 82 unsigned long r5, unsigned long r6, unsigned long r7);
87 83
@@ -324,20 +320,15 @@ early_init(int r3, int r4, int r5)
324 identify_cpu(offset, 0); 320 identify_cpu(offset, 0);
325 do_cpu_ftr_fixups(offset); 321 do_cpu_ftr_fixups(offset);
326 322
327#if defined(CONFIG_PPC_MULTIPLATFORM) 323#if defined(CONFIG_PPC_OF)
328 reloc_got2(offset); 324 reloc_got2(offset);
329 325
330 /* If we came here from BootX, clear the screen,
331 * set up some pointers and return. */
332 if ((r3 == 0x426f6f58) && (r5 == 0))
333 bootx_init(r4, phys);
334
335 /* 326 /*
336 * don't do anything on prep 327 * don't do anything on prep
337 * for now, don't use bootinfo because it breaks yaboot 0.5 328 * for now, don't use bootinfo because it breaks yaboot 0.5
338 * and assume that if we didn't find a magic number, we have OF 329 * and assume that if we didn't find a magic number, we have OF
339 */ 330 */
340 else if (*(unsigned long *)(0) != 0xdeadc0de) 331 if (*(unsigned long *)(0) != 0xdeadc0de)
341 phys = prom_init(r3, r4, (prom_entry)r5); 332 phys = prom_init(r3, r4, (prom_entry)r5);
342 333
343 reloc_got2(-offset); 334 reloc_got2(-offset);
@@ -424,6 +415,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
424 } 415 }
425#endif 416#endif
426 417
418#ifdef CONFIG_PPC_OF
427 have_of = 1; 419 have_of = 1;
428 420
429 /* prom_init has already been called from __start */ 421 /* prom_init has already been called from __start */
@@ -495,19 +487,17 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
495#endif /* CONFIG_ADB */ 487#endif /* CONFIG_ADB */
496 488
497 switch (_machine) { 489 switch (_machine) {
498#ifdef CONFIG_PPC_PMAC
499 case _MACH_Pmac:
500 pmac_init(r3, r4, r5, r6, r7);
501 break;
502#endif
503#ifdef CONFIG_PPC_CHRP 490#ifdef CONFIG_PPC_CHRP
504 case _MACH_chrp: 491 case _MACH_chrp:
505 chrp_init(r3, r4, r5, r6, r7); 492 chrp_init(r3, r4, r5, r6, r7);
506 break; 493 break;
507#endif 494#endif
508 } 495 }
496#endif /* CONFIG_PPC_OF */
509} 497}
498#endif /* CONFIG_PPC_MULTIPLATFORM */
510 499
500#ifdef CONFIG_PPC_OF
511#ifdef CONFIG_SERIAL_CORE_CONSOLE 501#ifdef CONFIG_SERIAL_CORE_CONSOLE
512extern char *of_stdout_device; 502extern char *of_stdout_device;
513 503
@@ -564,7 +554,7 @@ static int __init set_preferred_console(void)
564} 554}
565console_initcall(set_preferred_console); 555console_initcall(set_preferred_console);
566#endif /* CONFIG_SERIAL_CORE_CONSOLE */ 556#endif /* CONFIG_SERIAL_CORE_CONSOLE */
567#endif /* CONFIG_PPC_MULTIPLATFORM */ 557#endif /* CONFIG_PPC_OF */
568 558
569struct bi_record *find_bootinfo(void) 559struct bi_record *find_bootinfo(void)
570{ 560{
@@ -747,14 +737,6 @@ void __init setup_arch(char **cmdline_p)
747 if (ppc_md.init_early) 737 if (ppc_md.init_early)
748 ppc_md.init_early(); 738 ppc_md.init_early();
749 739
750#ifdef CONFIG_PPC_MULTIPLATFORM
751 /* This could be called "early setup arch", it must be done
752 * now because xmon need it
753 */
754 if (_machine == _MACH_Pmac)
755 pmac_feature_init(); /* New cool way */
756#endif
757
758#ifdef CONFIG_XMON 740#ifdef CONFIG_XMON
759 xmon_init(1); 741 xmon_init(1);
760 if (strstr(cmd_line, "xmon")) 742 if (strstr(cmd_line, "xmon"))