diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-22 02:02:39 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-22 02:02:39 -0400 |
commit | 35499c0195e46f479cf6ac16ad8d3f394b5fcc10 (patch) | |
tree | 25660acd2425de5236a1eff7a25dc931e6f86492 /arch/powerpc/kernel | |
parent | b6ba92819dc1304a4e5a0bf06b297c657b58168a (diff) |
powerpc: Merge in 64-bit powermac support.
This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to
arch/powerpc/platforms/powermac/*.c and makes various minor tweaks
elsewhere. On the powermac we now initialize ppc_md by copying
the whole pmac_md structure into it, which required some changes in
the ordering of initializations of individual fields of it.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 7 |
3 files changed, 15 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 72b0d26e41d4..147215a0d6c0 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1501,20 +1501,17 @@ copy_to_here: | |||
1501 | .section ".text"; | 1501 | .section ".text"; |
1502 | .align 2 ; | 1502 | .align 2 ; |
1503 | 1503 | ||
1504 | .globl pmac_secondary_start_1 | 1504 | .globl __secondary_start_pmac_0 |
1505 | pmac_secondary_start_1: | 1505 | __secondary_start_pmac_0: |
1506 | li r24, 1 | 1506 | /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */ |
1507 | b .pmac_secondary_start | 1507 | li r24,0 |
1508 | 1508 | b 1f | |
1509 | .globl pmac_secondary_start_2 | 1509 | li r24,1 |
1510 | pmac_secondary_start_2: | 1510 | b 1f |
1511 | li r24, 2 | 1511 | li r24,2 |
1512 | b .pmac_secondary_start | 1512 | b 1f |
1513 | 1513 | li r24,3 | |
1514 | .globl pmac_secondary_start_3 | 1514 | 1: |
1515 | pmac_secondary_start_3: | ||
1516 | li r24, 3 | ||
1517 | b .pmac_secondary_start | ||
1518 | 1515 | ||
1519 | _GLOBAL(pmac_secondary_start) | 1516 | _GLOBAL(pmac_secondary_start) |
1520 | /* turn on 64-bit mode */ | 1517 | /* turn on 64-bit mode */ |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 9b1baaa9eda0..095659d51b4b 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -772,7 +772,7 @@ static unsigned long __init prom_next_cell(int s, cell_t **cellp) | |||
772 | } | 772 | } |
773 | r = *p++; | 773 | r = *p++; |
774 | #ifdef CONFIG_PPC64 | 774 | #ifdef CONFIG_PPC64 |
775 | if (s) { | 775 | if (s > 1) { |
776 | r <<= 32; | 776 | r <<= 32; |
777 | r |= *(p++); | 777 | r |= *(p++); |
778 | } | 778 | } |
@@ -2059,7 +2059,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2059 | reloc_got2(-offset); | 2059 | reloc_got2(-offset); |
2060 | #endif | 2060 | #endif |
2061 | 2061 | ||
2062 | __start(hdr, 0, 0); | 2062 | __start(hdr, KERNELBASE + offset, 0); |
2063 | 2063 | ||
2064 | return 0; | 2064 | return 0; |
2065 | } | 2065 | } |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index b9269c038af3..2d7fdeb581d1 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -464,14 +464,11 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) | |||
464 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | 464 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); |
465 | #endif /* CONFIG_CMDLINE */ | 465 | #endif /* CONFIG_CMDLINE */ |
466 | 466 | ||
467 | platform_init(); | ||
468 | |||
467 | #ifdef CONFIG_6xx | 469 | #ifdef CONFIG_6xx |
468 | ppc_md.power_save = ppc6xx_idle; | 470 | ppc_md.power_save = ppc6xx_idle; |
469 | #endif | 471 | #endif |
470 | #ifdef CONFIG_POWER4 | ||
471 | ppc_md.power_save = power4_idle; | ||
472 | #endif | ||
473 | |||
474 | platform_init(); | ||
475 | 472 | ||
476 | if (ppc_md.progress) | 473 | if (ppc_md.progress) |
477 | ppc_md.progress("id mach(): done", 0x200); | 474 | ppc_md.progress("id mach(): done", 0x200); |