diff options
author | Michael Neuling <mikey@neuling.org> | 2012-10-30 15:34:14 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-11-14 21:00:42 -0500 |
commit | aec937b1ee6d7b28499d50ea6df1b2fe9edee91b (patch) | |
tree | a52d68b41ef4a83ad205aa52e20d2847665acf2b /arch | |
parent | cd5daaf713cf8d728a2be2a3673293fff9465d9a (diff) |
powerpc: Add POWER8 setup code
Just a copy of POWER7 for now. Will update with new code later.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_power.S | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S index 76797c5105d6..a92101d14b4e 100644 --- a/arch/powerpc/kernel/cpu_setup_power.S +++ b/arch/powerpc/kernel/cpu_setup_power.S | |||
@@ -44,6 +44,30 @@ _GLOBAL(__restore_cpu_power7) | |||
44 | mtlr r11 | 44 | mtlr r11 |
45 | blr | 45 | blr |
46 | 46 | ||
47 | _GLOBAL(__setup_cpu_power8) | ||
48 | mflr r11 | ||
49 | bl __init_hvmode_206 | ||
50 | mtlr r11 | ||
51 | beqlr | ||
52 | li r0,0 | ||
53 | mtspr SPRN_LPID,r0 | ||
54 | bl __init_LPCR | ||
55 | bl __init_TLB | ||
56 | mtlr r11 | ||
57 | blr | ||
58 | |||
59 | _GLOBAL(__restore_cpu_power8) | ||
60 | mflr r11 | ||
61 | mfmsr r3 | ||
62 | rldicl. r0,r3,4,63 | ||
63 | beqlr | ||
64 | li r0,0 | ||
65 | mtspr SPRN_LPID,r0 | ||
66 | bl __init_LPCR | ||
67 | bl __init_TLB | ||
68 | mtlr r11 | ||
69 | blr | ||
70 | |||
47 | __init_hvmode_206: | 71 | __init_hvmode_206: |
48 | /* Disable CPU_FTR_HVMODE and exit if MSR:HV is not set */ | 72 | /* Disable CPU_FTR_HVMODE and exit if MSR:HV is not set */ |
49 | mfmsr r3 | 73 | mfmsr r3 |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 0514c21f138b..361f6d91ab1b 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -68,6 +68,8 @@ extern void __restore_cpu_pa6t(void); | |||
68 | extern void __restore_cpu_ppc970(void); | 68 | extern void __restore_cpu_ppc970(void); |
69 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); | 69 | extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec); |
70 | extern void __restore_cpu_power7(void); | 70 | extern void __restore_cpu_power7(void); |
71 | extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec); | ||
72 | extern void __restore_cpu_power8(void); | ||
71 | extern void __restore_cpu_a2(void); | 73 | extern void __restore_cpu_a2(void); |
72 | #endif /* CONFIG_PPC64 */ | 74 | #endif /* CONFIG_PPC64 */ |
73 | #if defined(CONFIG_E500) | 75 | #if defined(CONFIG_E500) |