diff options
author | Olof Johansson <olof@lixom.net> | 2005-07-13 04:11:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-13 14:25:25 -0400 |
commit | f264cc28245d4d635d586be8c2148140726756dd (patch) | |
tree | b1ab054289acd3054e54d3caabaadaf1455f2d58 /arch/ppc64 | |
parent | 96e2844999f99878fc5b03b81ccaa60580005b81 (diff) |
[PATCH] ppc64: add 970MP PVR
Add PVR value and tests for 970MP. Also switch to a simpler (but slightly
longer) check at init time for simplicity.
Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/cpu_setup_power4.S | 38 | ||||
-rw-r--r-- | arch/ppc64/kernel/cputable.c | 15 |
2 files changed, 37 insertions, 16 deletions
diff --git a/arch/ppc64/kernel/cpu_setup_power4.S b/arch/ppc64/kernel/cpu_setup_power4.S index 42fc08cf87a0..0482c063c26e 100644 --- a/arch/ppc64/kernel/cpu_setup_power4.S +++ b/arch/ppc64/kernel/cpu_setup_power4.S | |||
@@ -31,10 +31,13 @@ _GLOBAL(__970_cpu_preinit) | |||
31 | */ | 31 | */ |
32 | mfspr r0,SPRN_PVR | 32 | mfspr r0,SPRN_PVR |
33 | srwi r0,r0,16 | 33 | srwi r0,r0,16 |
34 | cmpwi cr0,r0,0x39 | 34 | cmpwi r0,0x39 |
35 | cmpwi cr1,r0,0x3c | 35 | beq 1f |
36 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 36 | cmpwi r0,0x3c |
37 | beq 1f | ||
38 | cmpwi r0,0x44 | ||
37 | bnelr | 39 | bnelr |
40 | 1: | ||
38 | 41 | ||
39 | /* Make sure HID4:rm_ci is off before MMU is turned off, that large | 42 | /* Make sure HID4:rm_ci is off before MMU is turned off, that large |
40 | * pages are enabled with HID4:61 and clear HID5:DCBZ_size and | 43 | * pages are enabled with HID4:61 and clear HID5:DCBZ_size and |
@@ -133,12 +136,14 @@ _GLOBAL(__save_cpu_setup) | |||
133 | /* We only deal with 970 for now */ | 136 | /* We only deal with 970 for now */ |
134 | mfspr r0,SPRN_PVR | 137 | mfspr r0,SPRN_PVR |
135 | srwi r0,r0,16 | 138 | srwi r0,r0,16 |
136 | cmpwi cr0,r0,0x39 | 139 | cmpwi r0,0x39 |
137 | cmpwi cr1,r0,0x3c | 140 | beq 1f |
138 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 141 | cmpwi r0,0x3c |
139 | bne 1f | 142 | beq 1f |
140 | 143 | cmpwi r0,0x44 | |
141 | /* Save HID0,1,4 and 5 */ | 144 | bne 2f |
145 | |||
146 | 1: /* Save HID0,1,4 and 5 */ | ||
142 | mfspr r3,SPRN_HID0 | 147 | mfspr r3,SPRN_HID0 |
143 | std r3,CS_HID0(r5) | 148 | std r3,CS_HID0(r5) |
144 | mfspr r3,SPRN_HID1 | 149 | mfspr r3,SPRN_HID1 |
@@ -148,7 +153,7 @@ _GLOBAL(__save_cpu_setup) | |||
148 | mfspr r3,SPRN_HID5 | 153 | mfspr r3,SPRN_HID5 |
149 | std r3,CS_HID5(r5) | 154 | std r3,CS_HID5(r5) |
150 | 155 | ||
151 | 1: | 156 | 2: |
152 | mtcr r7 | 157 | mtcr r7 |
153 | blr | 158 | blr |
154 | 159 | ||
@@ -165,12 +170,14 @@ _GLOBAL(__restore_cpu_setup) | |||
165 | /* We only deal with 970 for now */ | 170 | /* We only deal with 970 for now */ |
166 | mfspr r0,SPRN_PVR | 171 | mfspr r0,SPRN_PVR |
167 | srwi r0,r0,16 | 172 | srwi r0,r0,16 |
168 | cmpwi cr0,r0,0x39 | 173 | cmpwi r0,0x39 |
169 | cmpwi cr1,r0,0x3c | 174 | beq 1f |
170 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 175 | cmpwi r0,0x3c |
171 | bne 1f | 176 | beq 1f |
177 | cmpwi r0,0x44 | ||
178 | bnelr | ||
172 | 179 | ||
173 | /* Before accessing memory, we make sure rm_ci is clear */ | 180 | 1: /* Before accessing memory, we make sure rm_ci is clear */ |
174 | li r0,0 | 181 | li r0,0 |
175 | mfspr r3,SPRN_HID4 | 182 | mfspr r3,SPRN_HID4 |
176 | rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ | 183 | rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ |
@@ -223,6 +230,5 @@ _GLOBAL(__restore_cpu_setup) | |||
223 | mtspr SPRN_HID5,r3 | 230 | mtspr SPRN_HID5,r3 |
224 | sync | 231 | sync |
225 | isync | 232 | isync |
226 | 1: | ||
227 | blr | 233 | blr |
228 | 234 | ||
diff --git a/arch/ppc64/kernel/cputable.c b/arch/ppc64/kernel/cputable.c index 8d4c46f6f0b6..77cec42f9525 100644 --- a/arch/ppc64/kernel/cputable.c +++ b/arch/ppc64/kernel/cputable.c | |||
@@ -183,6 +183,21 @@ struct cpu_spec cpu_specs[] = { | |||
183 | .cpu_setup = __setup_cpu_ppc970, | 183 | .cpu_setup = __setup_cpu_ppc970, |
184 | .firmware_features = COMMON_PPC64_FW, | 184 | .firmware_features = COMMON_PPC64_FW, |
185 | }, | 185 | }, |
186 | { /* PPC970MP */ | ||
187 | .pvr_mask = 0xffff0000, | ||
188 | .pvr_value = 0x00440000, | ||
189 | .cpu_name = "PPC970MP", | ||
190 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
191 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | | ||
192 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP | | ||
193 | CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA, | ||
194 | .cpu_user_features = COMMON_USER_PPC64 | | ||
195 | PPC_FEATURE_HAS_ALTIVEC_COMP, | ||
196 | .icache_bsize = 128, | ||
197 | .dcache_bsize = 128, | ||
198 | .cpu_setup = __setup_cpu_ppc970, | ||
199 | .firmware_features = COMMON_PPC64_FW, | ||
200 | }, | ||
186 | { /* Power5 */ | 201 | { /* Power5 */ |
187 | .pvr_mask = 0xffff0000, | 202 | .pvr_mask = 0xffff0000, |
188 | .pvr_value = 0x003a0000, | 203 | .pvr_value = 0x003a0000, |