cputable.c 55.7 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3
/*
 *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
 *
S
Stephen Rothwell 已提交
4 5 6
 *  Modifications for ppc64:
 *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
 *
L
Linus Torvalds 已提交
7 8 9 10 11 12 13 14 15 16
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version
 *  2 of the License, or (at your option) any later version.
 */

#include <linux/string.h>
#include <linux/sched.h>
#include <linux/threads.h>
#include <linux/init.h>
17 18 19
#include <linux/module.h>

#include <asm/oprofile_impl.h>
L
Linus Torvalds 已提交
20
#include <asm/cputable.h>
21
#include <asm/prom.h>		/* for PTRRELOC on ARCH=ppc */
22
#include <asm/mmu.h>
L
Linus Torvalds 已提交
23

24
struct cpu_spec* cur_cpu_spec = NULL;
S
Stephen Rothwell 已提交
25
EXPORT_SYMBOL(cur_cpu_spec);
L
Linus Torvalds 已提交
26

27 28 29
/* The platform string corresponding to the real PVR */
const char *powerpc_base_platform;

S
Stephen Rothwell 已提交
30 31 32 33 34 35 36
/* NOTE:
 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
 * the responsibility of the appropriate CPU save/restore functions to
 * eventually copy these settings over. Those save/restore aren't yet
 * part of the cputable though. That has to be fixed for both ppc32
 * and ppc64
 */
37
#ifdef CONFIG_PPC32
38 39 40 41
extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
42 43
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
44
extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
45
extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
46
extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
47
extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
48
extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
49
extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
50
extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
51 52 53 54 55 56 57 58
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
59
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
60
#ifdef CONFIG_PPC64
61
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
62
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
63
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
64
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
65
extern void __restore_cpu_ppc970(void);
66 67
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
68
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
69 70 71 72

/* This table only contains "desktop" CPUs, it need to be filled with embedded
 * ones as well...
 */
S
Stephen Rothwell 已提交
73 74 75
#define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
				 PPC_FEATURE_HAS_MMU)
#define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
76
#define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
77 78 79 80
#define COMMON_USER_POWER5	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_POWER5_PLUS	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
81
#define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
82
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
83 84
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
85 86
#define COMMON_USER_POWER7	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
87 88
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
89 90 91
#define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_HAS_ALTIVEC_COMP)
92 93
#define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
				 PPC_FEATURE_BOOKE)
L
Linus Torvalds 已提交
94

95
static struct cpu_spec __initdata cpu_specs[] = {
S
Stephen Rothwell 已提交
96 97 98 99 100 101
#ifdef CONFIG_PPC64
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
102
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
103
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
104 105 106
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
107
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
108
		.oprofile_cpu_type	= "ppc64/power3",
109
		.oprofile_type		= PPC_OPROFILE_RS64,
110
		.machine_check		= machine_check_generic,
111
		.platform		= "power3",
S
Stephen Rothwell 已提交
112 113 114 115 116 117
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
118
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
119
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
120 121 122
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
123
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
124
		.oprofile_cpu_type	= "ppc64/power3",
125
		.oprofile_type		= PPC_OPROFILE_RS64,
126
		.machine_check		= machine_check_generic,
127
		.platform		= "power3",
S
Stephen Rothwell 已提交
128 129 130 131 132 133 134
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
135
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
136 137 138
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
139
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
140
		.oprofile_cpu_type	= "ppc64/rs64",
141
		.oprofile_type		= PPC_OPROFILE_RS64,
142
		.machine_check		= machine_check_generic,
143
		.platform		= "rs64",
S
Stephen Rothwell 已提交
144 145 146 147 148 149 150
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
151
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
152 153 154
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
155
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
156
		.oprofile_cpu_type	= "ppc64/rs64",
157
		.oprofile_type		= PPC_OPROFILE_RS64,
158
		.machine_check		= machine_check_generic,
159
		.platform		= "rs64",
S
Stephen Rothwell 已提交
160 161 162 163 164 165 166
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
167
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
168 169 170
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
171
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
172
		.oprofile_cpu_type	= "ppc64/rs64",
173
		.oprofile_type		= PPC_OPROFILE_RS64,
174
		.machine_check		= machine_check_generic,
175
		.platform		= "rs64",
S
Stephen Rothwell 已提交
176 177 178 179 180 181 182
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
183
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
184 185 186
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
187
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
188
		.oprofile_cpu_type	= "ppc64/rs64",
189
		.oprofile_type		= PPC_OPROFILE_RS64,
190
		.machine_check		= machine_check_generic,
191
		.platform		= "rs64",
S
Stephen Rothwell 已提交
192 193 194 195 196 197
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
198
		.cpu_user_features	= COMMON_USER_POWER4,
199
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
200 201 202
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
203
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
204
		.oprofile_cpu_type	= "ppc64/power4",
205
		.oprofile_type		= PPC_OPROFILE_POWER4,
206
		.machine_check		= machine_check_generic,
207
		.platform		= "power4",
S
Stephen Rothwell 已提交
208 209 210 211 212 213
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
214
		.cpu_user_features	= COMMON_USER_POWER4,
215
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
216 217 218
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
219
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
220
		.oprofile_cpu_type	= "ppc64/power4",
221
		.oprofile_type		= PPC_OPROFILE_POWER4,
222
		.machine_check		= machine_check_generic,
223
		.platform		= "power4",
S
Stephen Rothwell 已提交
224 225 226 227 228 229
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
230
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
231
			PPC_FEATURE_HAS_ALTIVEC_COMP,
232
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
233 234 235
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
236
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
237
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
238
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
239
		.oprofile_cpu_type	= "ppc64/970",
240
		.oprofile_type		= PPC_OPROFILE_POWER4,
241
		.machine_check		= machine_check_generic,
242
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
243 244 245 246 247 248
	},
	{	/* PPC970FX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003c0000,
		.cpu_name		= "PPC970FX",
		.cpu_features		= CPU_FTRS_PPC970,
249
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
250
			PPC_FEATURE_HAS_ALTIVEC_COMP,
251
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
252 253 254
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
255
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
256
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
257
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
258
		.oprofile_cpu_type	= "ppc64/970",
259
		.oprofile_type		= PPC_OPROFILE_POWER4,
260
		.machine_check		= machine_check_generic,
261
		.platform		= "ppc970",
262 263 264 265 266 267 268 269
	},
	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00440100,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
270
		.mmu_features		= MMU_FTR_HPTE_TABLE,
271 272 273
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
274
		.pmc_type		= PPC_PMC_IBM,
275 276 277 278
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
279
		.machine_check		= machine_check_generic,
280
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
281 282 283 284 285 286
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
287
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
288
			PPC_FEATURE_HAS_ALTIVEC_COMP,
289
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
290 291
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
292
		.num_pmcs		= 8,
293
		.pmc_type		= PPC_PMC_IBM,
294
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
295
		.cpu_restore		= __restore_cpu_ppc970,
296
		.oprofile_cpu_type	= "ppc64/970MP",
297
		.oprofile_type		= PPC_OPROFILE_POWER4,
298
		.machine_check		= machine_check_generic,
299
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
300
	},
J
Jake Moilanen 已提交
301 302 303 304 305 306 307
	{	/* PPC970GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00450000,
		.cpu_name		= "PPC970GX",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
308
		.mmu_features		= MMU_FTR_HPTE_TABLE,
J
Jake Moilanen 已提交
309 310 311
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
312
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
313 314 315
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
316
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
317 318
		.platform		= "ppc970",
	},
319
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
320 321 322 323
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
324
		.cpu_user_features	= COMMON_USER_POWER5,
325
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
326 327 328
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
329
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
330
		.oprofile_cpu_type	= "ppc64/power5",
331
		.oprofile_type		= PPC_OPROFILE_POWER4,
332 333 334 335 336
		/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
		 * and above but only works on POWER5 and above
		 */
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
337
		.machine_check		= machine_check_generic,
338
		.platform		= "power5",
S
Stephen Rothwell 已提交
339
	},
340 341 342 343 344 345
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
346
		.mmu_features		= MMU_FTR_HPTE_TABLE,
347 348 349 350 351 352 353
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.oprofile_cpu_type	= "ppc64/power5++",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
354
		.machine_check		= machine_check_generic,
355 356
		.platform		= "power5+",
	},
357
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
358 359
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
360
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
361
		.cpu_features		= CPU_FTRS_POWER5,
362
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
363
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
364 365 366
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
367
		.pmc_type		= PPC_PMC_IBM,
368
		.oprofile_cpu_type	= "ppc64/power5+",
369
		.oprofile_type		= PPC_OPROFILE_POWER4,
370 371
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
372
		.machine_check		= machine_check_generic,
373
		.platform		= "power5+",
S
Stephen Rothwell 已提交
374
	},
375 376 377 378 379 380
	{	/* POWER6 in P5+ mode; 2.04-compliant processor */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000001,
		.cpu_name		= "POWER5+",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
381
		.mmu_features		= MMU_FTR_HPTE_TABLE,
382 383
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
384
		.machine_check		= machine_check_generic,
385
		.oprofile_cpu_type	= "ppc64/compat-power5+",
386 387
		.platform		= "power5+",
	},
388 389 390
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
391 392 393 394
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
395
		.mmu_features		= MMU_FTR_HPTE_TABLE,
396 397 398
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
399
		.pmc_type		= PPC_PMC_IBM,
400 401 402 403 404 405
		.oprofile_cpu_type	= "ppc64/power6",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
406
		.machine_check		= machine_check_generic,
407 408 409 410 411 412
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
413 414
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
415
		.mmu_features		= MMU_FTR_HPTE_TABLE,
416 417
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
418
		.machine_check		= machine_check_generic,
419
		.oprofile_cpu_type	= "ppc64/compat-power6",
420 421
		.platform		= "power6",
	},
422 423 424 425 426 427
	{	/* 2.06-compliant processor, i.e. Power7 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000003,
		.cpu_name		= "POWER7 (architected)",
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
428
		.mmu_features		= MMU_FTR_HPTE_TABLE,
429 430 431
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_generic,
432
		.oprofile_cpu_type	= "ppc64/compat-power7",
433 434
		.platform		= "power7",
	},
435 436 437
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
438
		.cpu_name		= "POWER7 (raw)",
439 440
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
441
		.mmu_features		= MMU_FTR_HPTE_TABLE,
442 443 444 445 446 447 448 449 450 451 452 453 454 455
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.pmc_type		= PPC_PMC_IBM,
		.cpu_setup		= __setup_cpu_power7,
		.cpu_restore		= __restore_cpu_power7,
		.oprofile_cpu_type	= "ppc64/power7",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
		.platform		= "power7",
	},
456
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
457 458 459 460 461
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
462 463
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
464
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
465 466
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
467
		.num_pmcs		= 4,
468
		.pmc_type		= PPC_PMC_IBM,
469 470
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
471
		.machine_check		= machine_check_generic,
472
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
473
	},
474 475 476 477 478 479
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
480
		.mmu_features		= MMU_FTR_HPTE_TABLE,
481 482 483
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
484
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
485 486
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
487 488
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
489
		.machine_check		= machine_check_generic,
490 491
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
492 493 494 495 496 497
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
498
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
499 500 501
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
502
		.pmc_type		= PPC_PMC_IBM,
503
		.machine_check		= machine_check_generic,
504
		.platform		= "power4",
S
Stephen Rothwell 已提交
505 506 507
	}
#endif	/* CONFIG_PPC64 */
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
508
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
509
	{	/* 601 */
L
Linus Torvalds 已提交
510 511 512
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
513
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
514
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
515
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
516
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
517 518
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
519
		.machine_check		= machine_check_generic,
520
		.platform		= "ppc601",
L
Linus Torvalds 已提交
521 522 523 524 525
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
526
		.cpu_features		= CPU_FTRS_603,
527
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
528
		.mmu_features		= 0,
L
Linus Torvalds 已提交
529 530
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
531
		.cpu_setup		= __setup_cpu_603,
532
		.machine_check		= machine_check_generic,
533
		.platform		= "ppc603",
L
Linus Torvalds 已提交
534 535 536 537 538
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
539
		.cpu_features		= CPU_FTRS_603,
540
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
541
		.mmu_features		= 0,
L
Linus Torvalds 已提交
542 543
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
544
		.cpu_setup		= __setup_cpu_603,
545
		.machine_check		= machine_check_generic,
546
		.platform		= "ppc603",
L
Linus Torvalds 已提交
547 548 549 550 551
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
552
		.cpu_features		= CPU_FTRS_603,
553
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
554
		.mmu_features		= 0,
L
Linus Torvalds 已提交
555 556
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
557
		.cpu_setup		= __setup_cpu_603,
558
		.machine_check		= machine_check_generic,
559
		.platform		= "ppc603",
L
Linus Torvalds 已提交
560 561 562 563 564
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
565
		.cpu_features		= CPU_FTRS_604,
566
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
567
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
568 569 570
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
571
		.cpu_setup		= __setup_cpu_604,
572
		.machine_check		= machine_check_generic,
573
		.platform		= "ppc604",
L
Linus Torvalds 已提交
574 575 576 577 578
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
579
		.cpu_features		= CPU_FTRS_604,
580
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
581
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
582 583 584
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
585
		.cpu_setup		= __setup_cpu_604,
586
		.machine_check		= machine_check_generic,
587
		.platform		= "ppc604",
L
Linus Torvalds 已提交
588 589 590 591 592
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
593
		.cpu_features		= CPU_FTRS_604,
594
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
595
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
596 597 598
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
599
		.cpu_setup		= __setup_cpu_604,
600
		.machine_check		= machine_check_generic,
601
		.platform		= "ppc604",
L
Linus Torvalds 已提交
602 603 604 605 606
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
607
		.cpu_features		= CPU_FTRS_604,
608
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
609
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
610 611 612
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
613
		.cpu_setup		= __setup_cpu_604,
614
		.machine_check		= machine_check_generic,
615
		.platform		= "ppc604",
L
Linus Torvalds 已提交
616 617 618 619 620
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
621
		.cpu_features		= CPU_FTRS_740_NOTAU,
622
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
623
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
624 625 626
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
627
		.cpu_setup		= __setup_cpu_750,
628
		.machine_check		= machine_check_generic,
629
		.platform		= "ppc750",
L
Linus Torvalds 已提交
630 631 632 633 634
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
635
		.cpu_features		= CPU_FTRS_750,
636
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
637
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
638 639 640
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
641
		.cpu_setup		= __setup_cpu_750cx,
642
		.machine_check		= machine_check_generic,
643
		.platform		= "ppc750",
L
Linus Torvalds 已提交
644 645 646 647 648
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
649
		.cpu_features		= CPU_FTRS_750,
650
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
651
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
652 653 654
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
655
		.pmc_type		= PPC_PMC_IBM,
656
		.cpu_setup		= __setup_cpu_750cx,
657
		.machine_check		= machine_check_generic,
658
		.platform		= "ppc750",
L
Linus Torvalds 已提交
659 660 661 662 663
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
664
		.cpu_features		= CPU_FTRS_750,
665
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
666
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
667 668 669
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
670
		.pmc_type		= PPC_PMC_IBM,
671
		.cpu_setup		= __setup_cpu_750cx,
672
		.machine_check		= machine_check_generic,
673
		.platform		= "ppc750",
L
Linus Torvalds 已提交
674
	},
675 676 677 678
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
679
		.cpu_features		= CPU_FTRS_750,
680
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
681
		.mmu_features		= MMU_FTR_HPTE_TABLE,
682 683 684
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
685
		.pmc_type		= PPC_PMC_IBM,
686
		.cpu_setup		= __setup_cpu_750cx,
687
		.machine_check		= machine_check_generic,
688
		.platform		= "ppc750",
689
	},
J
Jake Moilanen 已提交
690 691 692 693
	{	/* 750CL */
		.pvr_mask		= 0xfffff0f0,
		.pvr_value		= 0x00087010,
		.cpu_name		= "750CL",
694
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
695
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
696
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
J
Jake Moilanen 已提交
697 698 699
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
700
		.pmc_type		= PPC_PMC_IBM,
701
		.cpu_setup		= __setup_cpu_750,
702
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
703 704
		.platform		= "ppc750",
	},
705 706 707 708
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
709
		.cpu_features		= CPU_FTRS_750,
710
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
711
		.mmu_features		= MMU_FTR_HPTE_TABLE,
712 713 714
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
715
		.pmc_type		= PPC_PMC_IBM,
716
		.cpu_setup		= __setup_cpu_750,
717
		.machine_check		= machine_check_generic,
718
		.platform		= "ppc750",
719
	},
L
Linus Torvalds 已提交
720 721 722 723
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
724
		.cpu_features		= CPU_FTRS_750FX1,
725
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
726
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
727 728 729
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
730
		.pmc_type		= PPC_PMC_IBM,
731
		.cpu_setup		= __setup_cpu_750,
732
		.machine_check		= machine_check_generic,
733
		.platform		= "ppc750",
L
Linus Torvalds 已提交
734 735 736 737 738
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
739
		.cpu_features		= CPU_FTRS_750FX2,
740
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
741
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
742 743 744
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
745
		.pmc_type		= PPC_PMC_IBM,
746
		.cpu_setup		= __setup_cpu_750,
747
		.machine_check		= machine_check_generic,
748
		.platform		= "ppc750",
L
Linus Torvalds 已提交
749 750 751 752 753
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
754
		.cpu_features		= CPU_FTRS_750FX,
755
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
756
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
757 758 759
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
760
		.pmc_type		= PPC_PMC_IBM,
761
		.cpu_setup		= __setup_cpu_750fx,
762
		.machine_check		= machine_check_generic,
763
		.platform		= "ppc750",
L
Linus Torvalds 已提交
764 765 766 767 768
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
769
		.cpu_features		= CPU_FTRS_750GX,
770
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
771
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
772 773 774
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
775
		.pmc_type		= PPC_PMC_IBM,
776
		.cpu_setup		= __setup_cpu_750fx,
777
		.machine_check		= machine_check_generic,
778
		.platform		= "ppc750",
L
Linus Torvalds 已提交
779 780 781 782 783
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
784
		.cpu_features		= CPU_FTRS_740,
785
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
786
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
787 788 789
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
790
		.pmc_type		= PPC_PMC_IBM,
791
		.cpu_setup		= __setup_cpu_750,
792
		.machine_check		= machine_check_generic,
793
		.platform		= "ppc750",
L
Linus Torvalds 已提交
794 795 796 797 798
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
799
		.cpu_features		= CPU_FTRS_7400_NOTAU,
800 801
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
802
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
803 804 805
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
806
		.pmc_type		= PPC_PMC_G4,
807
		.cpu_setup		= __setup_cpu_7400,
808
		.machine_check		= machine_check_generic,
809
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
810 811 812 813 814
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
815
		.cpu_features		= CPU_FTRS_7400,
816 817
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
818
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
819 820 821
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
822
		.pmc_type		= PPC_PMC_G4,
823
		.cpu_setup		= __setup_cpu_7400,
824
		.machine_check		= machine_check_generic,
825
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
826 827 828 829 830
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
831
		.cpu_features		= CPU_FTRS_7400,
832 833
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
834
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
835 836 837
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
838
		.pmc_type		= PPC_PMC_G4,
839
		.cpu_setup		= __setup_cpu_7410,
840
		.machine_check		= machine_check_generic,
841
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
842 843 844 845 846
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
847
		.cpu_features		= CPU_FTRS_7450_20,
848 849
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
850
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
851 852 853
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
854
		.pmc_type		= PPC_PMC_G4,
855 856
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
857
		.oprofile_type		= PPC_OPROFILE_G4,
858
		.machine_check		= machine_check_generic,
859
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
860 861 862 863 864
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
865
		.cpu_features		= CPU_FTRS_7450_21,
866 867
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
868
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
869 870 871
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
872
		.pmc_type		= PPC_PMC_G4,
873 874
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
875
		.oprofile_type		= PPC_OPROFILE_G4,
876
		.machine_check		= machine_check_generic,
877
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
878 879 880 881 882
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
883
		.cpu_features		= CPU_FTRS_7450_23,
884 885
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
886
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
887 888 889
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
890
		.pmc_type		= PPC_PMC_G4,
891 892
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
893
		.oprofile_type		= PPC_OPROFILE_G4,
894
		.machine_check		= machine_check_generic,
895
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
896 897 898 899 900
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
901
		.cpu_features		= CPU_FTRS_7455_1,
902 903
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
904
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
905 906 907
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
908
		.pmc_type		= PPC_PMC_G4,
909 910
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
911
		.oprofile_type		= PPC_OPROFILE_G4,
912
		.machine_check		= machine_check_generic,
913
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
914 915 916 917 918
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
919
		.cpu_features		= CPU_FTRS_7455_20,
920 921
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
922
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
923 924 925
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
926
		.pmc_type		= PPC_PMC_G4,
927 928
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
929
		.oprofile_type		= PPC_OPROFILE_G4,
930
		.machine_check		= machine_check_generic,
931
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
932 933 934 935 936
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
937
		.cpu_features		= CPU_FTRS_7455,
938 939
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
940
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
941 942 943
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
944
		.pmc_type		= PPC_PMC_G4,
945 946
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
947
		.oprofile_type		= PPC_OPROFILE_G4,
948
		.machine_check		= machine_check_generic,
949
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
950 951 952 953 954
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
955
		.cpu_features		= CPU_FTRS_7447_10,
956 957
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
958
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
959 960 961
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
962
		.pmc_type		= PPC_PMC_G4,
963 964
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
965
		.oprofile_type		= PPC_OPROFILE_G4,
966
		.machine_check		= machine_check_generic,
967
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
968 969 970 971 972
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
973
		.cpu_features		= CPU_FTRS_7447_10,
974 975
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
976
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
977 978 979
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
980
		.pmc_type		= PPC_PMC_G4,
981 982
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
983
		.oprofile_type		= PPC_OPROFILE_G4,
984
		.machine_check		= machine_check_generic,
985
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
986 987 988 989 990
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
991
		.cpu_features		= CPU_FTRS_7447,
992
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
993
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
994 995 996
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
997
		.pmc_type		= PPC_PMC_G4,
998 999
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1000
		.oprofile_type		= PPC_OPROFILE_G4,
1001
		.machine_check		= machine_check_generic,
1002
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1003 1004 1005 1006 1007
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
1008
		.cpu_features		= CPU_FTRS_7447A,
1009 1010
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1011
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1012 1013 1014
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1015
		.pmc_type		= PPC_PMC_G4,
1016 1017
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1018
		.oprofile_type		= PPC_OPROFILE_G4,
1019
		.machine_check		= machine_check_generic,
1020
		.platform		= "ppc7450",
1021 1022 1023 1024 1025
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
1026
		.cpu_features		= CPU_FTRS_7448,
1027 1028
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1029
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1030 1031 1032
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1033
		.pmc_type		= PPC_PMC_G4,
1034 1035
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1036
		.oprofile_type		= PPC_OPROFILE_G4,
1037
		.machine_check		= machine_check_generic,
1038
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1039 1040 1041 1042 1043
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
1044
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
1045
		.cpu_user_features	= COMMON_USER,
1046
		.mmu_features		= 0,
L
Linus Torvalds 已提交
1047 1048
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1049
		.cpu_setup		= __setup_cpu_603,
1050
		.machine_check		= machine_check_generic,
1051
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1052 1053 1054 1055 1056
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
1057
		.cpu_features		= CPU_FTRS_G2_LE,
S
Stephen Rothwell 已提交
1058
		.cpu_user_features	= COMMON_USER,
1059
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1060 1061
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1062
		.cpu_setup		= __setup_cpu_603,
1063
		.machine_check		= machine_check_generic,
1064
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1065
	},
1066
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
1067 1068
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
1069
		.cpu_name		= "e300c1",
1070
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
1071
		.cpu_user_features	= COMMON_USER,
1072
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1073 1074
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1075
		.cpu_setup		= __setup_cpu_603,
1076
		.machine_check		= machine_check_generic,
1077
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1078
	},
1079 1080 1081 1082
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
1083
		.cpu_features		= CPU_FTRS_E300C2,
1084
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1085
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
1086 1087 1088
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1089
		.machine_check		= machine_check_generic,
1090 1091
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1092
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1093 1094 1095 1096 1097
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1098
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
1099 1100 1101
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1102 1103 1104
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1105 1106
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1107 1108 1109 1110 1111 1112
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1113
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Li Yang 已提交
1114 1115 1116
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1117
		.machine_check		= machine_check_generic,
1118 1119 1120
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
L
Li Yang 已提交
1121 1122
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
1123 1124 1125 1126
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1127
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
1128
		.cpu_user_features	= COMMON_USER,
1129
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
1130 1131
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1132
		.machine_check		= machine_check_generic,
1133
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1134 1135 1136 1137 1138 1139 1140 1141 1142
	},
#endif /* CLASSIC_PPC */
#ifdef CONFIG_8xx
	{	/* 8xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00500000,
		.cpu_name		= "8xx",
		/* CPU_FTR_MAYBE_CAN_DOZE is possible,
		 * if the 8xx code is there.... */
1143
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
1144
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1145
		.mmu_features		= MMU_FTR_TYPE_8xx,
L
Linus Torvalds 已提交
1146 1147
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1148
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1149 1150 1151 1152 1153 1154 1155
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1156
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1157
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1158
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1159 1160
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1161
		.machine_check		= machine_check_4xx,
1162
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1163 1164 1165 1166 1167
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1168
		.cpu_features		= CPU_FTRS_40X,
1169 1170
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1171
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1172 1173
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1174
		.machine_check		= machine_check_4xx,
1175
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1176 1177 1178 1179 1180
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1181
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1182
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1183
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1184 1185
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1186
		.machine_check		= machine_check_4xx,
1187
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1188 1189 1190 1191 1192
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1193
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1194 1195
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1196
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1197 1198
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1199
		.machine_check		= machine_check_4xx,
1200
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1201 1202 1203 1204 1205
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1206
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1207 1208
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1209
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1210 1211
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1212
		.machine_check		= machine_check_4xx,
1213
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1214 1215 1216 1217 1218
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1219
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1220 1221
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1222
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1223 1224
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1225
		.machine_check		= machine_check_4xx,
1226
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1227 1228 1229 1230 1231
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1232
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1233 1234
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1235
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1236 1237
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1238
		.machine_check		= machine_check_4xx,
1239
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1240 1241 1242 1243 1244
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1245
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1246 1247
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1248
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1249 1250
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1251
		.machine_check		= machine_check_4xx,
1252
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1253 1254 1255 1256 1257
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1258
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1259 1260
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1261
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1262 1263
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1264
		.machine_check		= machine_check_4xx,
1265
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1266 1267 1268 1269 1270
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1271
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1272 1273
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1274
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1275 1276
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1277
		.machine_check		= machine_check_4xx,
1278
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1279 1280 1281 1282 1283
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1284
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1285 1286
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1287
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1288 1289
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1290
		.machine_check		= machine_check_4xx,
1291
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1292 1293 1294 1295 1296
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1297
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1298
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1299
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1300 1301
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1302
		.machine_check		= machine_check_4xx,
1303
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1304 1305
	},
	{	/* Xilinx Virtex-II Pro  */
1306
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1307 1308
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1309
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1310 1311
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1312
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1313 1314
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1315
		.machine_check		= machine_check_4xx,
1316
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1317
	},
1318 1319 1320 1321 1322 1323 1324
	{	/* Xilinx Virtex-4 FX */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x20011000,
		.cpu_name		= "Virtex-4 FX",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1325
		.mmu_features		= MMU_FTR_TYPE_40x,
1326 1327
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1328
		.machine_check		= machine_check_4xx,
1329
		.platform		= "ppc405",
1330
	},
1331 1332 1333 1334
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1335
		.cpu_features		= CPU_FTRS_40X,
1336 1337
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1338
		.mmu_features		= MMU_FTR_TYPE_40x,
1339 1340
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1341
		.machine_check		= machine_check_4xx,
1342 1343 1344
		.platform		= "ppc405",
	},
	{	/* 405EX */
1345 1346
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910004,
1347 1348
		.cpu_name		= "405EX",
		.cpu_features		= CPU_FTRS_40X,
1349 1350
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1351
		.mmu_features		= MMU_FTR_TYPE_40x,
1352 1353
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1354
		.machine_check		= machine_check_4xx,
1355
		.platform		= "ppc405",
1356
	},
1357 1358 1359 1360 1361 1362 1363
	{	/* 405EXr */
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910000,
		.cpu_name		= "405EXr",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1364
		.mmu_features		= MMU_FTR_TYPE_40x,
1365 1366 1367 1368 1369
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1370 1371 1372 1373 1374 1375 1376 1377
	{
		/* 405EZ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41510000,
		.cpu_name		= "405EZ",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1378
		.mmu_features		= MMU_FTR_TYPE_40x,
1379 1380 1381 1382 1383
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1384 1385 1386 1387 1388 1389 1390
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 40x PPC)",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1391
		.mmu_features		= MMU_FTR_TYPE_40x,
1392 1393 1394 1395 1396
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	}
L
Linus Torvalds 已提交
1397 1398 1399

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1400 1401 1402
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1403 1404 1405
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1406
		.mmu_features		= MMU_FTR_TYPE_44x,
1407 1408
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1409
		.machine_check		= machine_check_4xx,
1410 1411 1412 1413 1414
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1415
		.cpu_name		= "440EP Rev. A",
1416
		.cpu_features		= CPU_FTRS_44X,
1417
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1418
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1419 1420
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1421
		.cpu_setup		= __setup_cpu_440ep,
1422
		.machine_check		= machine_check_4xx,
1423
		.platform		= "ppc440",
M
Matt Porter 已提交
1424 1425 1426 1427
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1428
		.cpu_name		= "440GR Rev. B",
1429
		.cpu_features		= CPU_FTRS_44X,
1430
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1431
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1432 1433
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1434
		.machine_check		= machine_check_4xx,
1435
		.platform		= "ppc440",
M
Matt Porter 已提交
1436
	},
1437 1438 1439 1440 1441 1442
	{ /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ff7,
		.pvr_value		= 0x400008d4,
		.cpu_name		= "440EP Rev. C",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1443
		.mmu_features		= MMU_FTR_TYPE_44x,
1444 1445 1446 1447 1448 1449
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440ep,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	},
1450 1451 1452 1453
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1454 1455
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1456
		.mmu_features		= MMU_FTR_TYPE_44x,
1457 1458
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1459
		.cpu_setup		= __setup_cpu_440ep,
1460
		.machine_check		= machine_check_4xx,
1461
		.platform		= "ppc440",
1462 1463 1464
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1465
		.pvr_value		= 0x200008D0,
1466 1467 1468
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1469
		.mmu_features		= MMU_FTR_TYPE_44x,
1470 1471
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1472
		.cpu_setup		= __setup_cpu_440grx,
1473
		.machine_check		= machine_check_440A,
1474
		.platform		= "ppc440",
1475
	},
1476 1477 1478 1479 1480 1481
	{ /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ffb,
		.pvr_value		= 0x200008D8,
		.cpu_name		= "440EPX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1482
		.mmu_features		= MMU_FTR_TYPE_44x,
1483 1484 1485
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440epx,
1486
		.machine_check		= machine_check_440A,
1487 1488
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1489
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1490 1491 1492
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1493
		.cpu_features		= CPU_FTRS_44X,
1494
		.cpu_user_features	= COMMON_USER_BOOKE,
1495
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1496 1497
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1498
		.machine_check		= machine_check_4xx,
1499
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1500
	},
S
Stephen Rothwell 已提交
1501
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1502 1503 1504
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1505
		.cpu_features		= CPU_FTRS_44X,
1506
		.cpu_user_features	= COMMON_USER_BOOKE,
1507
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1508 1509
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1510
		.machine_check		= machine_check_4xx,
1511
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1512 1513 1514 1515 1516
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1517
		.cpu_features		= CPU_FTRS_44X,
1518
		.cpu_user_features	= COMMON_USER_BOOKE,
1519
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1520 1521
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1522 1523
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1524
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1525 1526 1527 1528 1529
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1530
		.cpu_features		= CPU_FTRS_44X,
1531
		.cpu_user_features	= COMMON_USER_BOOKE,
1532
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1533 1534
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1535 1536
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1537
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1538 1539 1540 1541 1542
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1543
		.cpu_features		= CPU_FTRS_44X,
1544
		.cpu_user_features	= COMMON_USER_BOOKE,
1545
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1546 1547
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1548 1549
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1550
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1551
	},
1552 1553 1554 1555
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1556
		.cpu_features		= CPU_FTRS_44X,
1557
		.cpu_user_features	= COMMON_USER_BOOKE,
1558
		.mmu_features		= MMU_FTR_TYPE_44x,
1559 1560
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1561 1562
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1563
		.platform		= "ppc440",
1564
	},
1565
	{ /* 440SP Rev. A */
1566 1567
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1568
		.cpu_name		= "440SP Rev. A",
1569
		.cpu_features		= CPU_FTRS_44X,
1570
		.cpu_user_features	= COMMON_USER_BOOKE,
1571
		.mmu_features		= MMU_FTR_TYPE_44x,
1572 1573
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1574
		.machine_check		= machine_check_4xx,
1575
		.platform		= "ppc440",
1576
	},
R
Roland Dreier 已提交
1577
	{ /* 440SPe Rev. A */
1578 1579 1580 1581 1582
		.pvr_mask               = 0xfff00fff,
		.pvr_value              = 0x53400890,
		.cpu_name               = "440SPe Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features      = COMMON_USER_BOOKE,
1583
		.mmu_features		= MMU_FTR_TYPE_44x,
1584 1585
		.icache_bsize           = 32,
		.dcache_bsize           = 32,
1586 1587
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1588 1589 1590 1591 1592 1593
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1594
		.cpu_features		= CPU_FTRS_44X,
1595
		.cpu_user_features	= COMMON_USER_BOOKE,
1596
		.mmu_features		= MMU_FTR_TYPE_44x,
R
Roland Dreier 已提交
1597 1598
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1599 1600
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1601
		.platform		= "ppc440",
R
Roland Dreier 已提交
1602
	},
1603 1604 1605 1606 1607 1608
	{ /* 440 in Xilinx Virtex-5 FXT */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x7ff21910,
		.cpu_name		= "440 in Virtex-5 FXT",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1609
		.mmu_features		= MMU_FTR_TYPE_44x,
1610 1611
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1612 1613
		.cpu_setup		= __setup_cpu_440x5,
		.machine_check		= machine_check_440A,
1614 1615
		.platform		= "ppc440",
	},
1616 1617 1618 1619
	{ /* 460EX */
		.pvr_mask		= 0xffff0002,
		.pvr_value		= 0x13020002,
		.cpu_name		= "460EX",
1620
		.cpu_features		= CPU_FTRS_440x6,
1621
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1622
		.mmu_features		= MMU_FTR_TYPE_44x,
1623 1624 1625 1626 1627 1628 1629 1630 1631 1632
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
	{ /* 460GT */
		.pvr_mask		= 0xffff0002,
		.pvr_value		= 0x13020000,
		.cpu_name		= "460GT",
1633
		.cpu_features		= CPU_FTRS_440x6,
1634
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1635
		.mmu_features		= MMU_FTR_TYPE_44x,
1636 1637
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1638
		.cpu_setup		= __setup_cpu_460gt,
1639 1640 1641
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654
	{ /* 460SX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x13541800,
		.cpu_name		= "460SX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460sx,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1655 1656 1657 1658 1659 1660
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 44x PPC)",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1661
		.mmu_features		= MMU_FTR_TYPE_44x,
1662 1663 1664 1665 1666
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	}
L
Linus Torvalds 已提交
1667
#endif /* CONFIG_44x */
1668
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1669
	{	/* e200z5 */
1670 1671 1672 1673
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1674
		.cpu_features		= CPU_FTRS_E200,
1675 1676
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1677
			PPC_FEATURE_UNIFIED_CACHE,
1678
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1679
		.dcache_bsize		= 32,
1680
		.machine_check		= machine_check_e200,
1681
		.platform		= "ppc5554",
1682
	},
S
Stephen Rothwell 已提交
1683
	{	/* e200z6 */
1684 1685 1686 1687
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1688
		.cpu_features		= CPU_FTRS_E200,
1689
		.cpu_user_features	= COMMON_USER_BOOKE |
1690 1691
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1692
			PPC_FEATURE_UNIFIED_CACHE,
1693
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1694
		.dcache_bsize		= 32,
1695
		.machine_check		= machine_check_e200,
1696
		.platform		= "ppc5554",
1697
	},
1698 1699 1700 1701 1702 1703 1704 1705
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic E200 PPC)",
		.cpu_features		= CPU_FTRS_E200,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
			PPC_FEATURE_UNIFIED_CACHE,
1706
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1707
		.dcache_bsize		= 32,
1708
		.cpu_setup		= __setup_cpu_e200,
1709 1710
		.machine_check		= machine_check_e200,
		.platform		= "ppc5554",
1711
	}
1712 1713
#endif /* CONFIG_E200 */
#ifdef CONFIG_E500
S
Stephen Rothwell 已提交
1714
	{	/* e500 */
L
Linus Torvalds 已提交
1715 1716 1717
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
1718
		.cpu_features		= CPU_FTRS_E500,
1719
		.cpu_user_features	= COMMON_USER_BOOKE |
1720 1721
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1722
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
1723 1724 1725
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1726
		.oprofile_cpu_type	= "ppc/e500",
1727
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1728
		.cpu_setup		= __setup_cpu_e500v1,
1729
		.machine_check		= machine_check_e500,
1730
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1731
	},
S
Stephen Rothwell 已提交
1732
	{	/* e500v2 */
1733 1734 1735
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
1736
		.cpu_features		= CPU_FTRS_E500_2,
1737
		.cpu_user_features	= COMMON_USER_BOOKE |
1738 1739 1740
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1741
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
1742 1743 1744
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1745
		.oprofile_cpu_type	= "ppc/e500",
1746
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1747
		.cpu_setup		= __setup_cpu_e500v2,
1748
		.machine_check		= machine_check_e500,
1749
		.platform		= "ppc8548",
1750
	},
1751 1752 1753 1754 1755 1756
	{	/* e500mc */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80230000,
		.cpu_name		= "e500mc",
		.cpu_features		= CPU_FTRS_E500MC,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1757
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
1758 1759 1760 1761 1762
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500", /* xxx - galak, e500mc? */
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1763
		.cpu_setup		= __setup_cpu_e500mc,
1764 1765 1766
		.machine_check		= machine_check_e500,
		.platform		= "ppce500mc",
	},
L
Linus Torvalds 已提交
1767 1768 1769
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
1770 1771 1772 1773 1774
		.cpu_name		= "(generic E500 PPC)",
		.cpu_features		= CPU_FTRS_E500,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1775
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
1776 1777
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1778
		.machine_check		= machine_check_e500,
1779
		.platform		= "powerpc",
1780
	}
1781
#endif /* CONFIG_E500 */
S
Stephen Rothwell 已提交
1782
#endif /* CONFIG_PPC32 */
L
Linus Torvalds 已提交
1783
};
1784

1785 1786 1787
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1788 1789
{
	struct cpu_spec *s = cpu_specs;
1790
	struct cpu_spec *t = &the_cpu_spec;
1791 1792 1793
	int i;

	s = PTRRELOC(s);
1794
	t = PTRRELOC(t);
1795 1796 1797

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812
			/*
			 * If we are overriding a previous value derived
			 * from the real PVR with a new value obtained
			 * using a logical PVR value, don't modify the
			 * performance monitor fields.
			 */
			if (t->num_pmcs && !s->num_pmcs) {
				t->cpu_name = s->cpu_name;
				t->cpu_features = s->cpu_features;
				t->cpu_user_features = s->cpu_user_features;
				t->icache_bsize = s->icache_bsize;
				t->dcache_bsize = s->dcache_bsize;
				t->cpu_setup = s->cpu_setup;
				t->cpu_restore = s->cpu_restore;
				t->platform = s->platform;
1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829
				/*
				 * If we have passed through this logic once
				 * before and have pulled the default case
				 * because the real PVR was not found inside
				 * cpu_specs[], then we are possibly running in
				 * compatibility mode. In that case, let the
				 * oprofiler know which set of compatibility
				 * counters to pull from by making sure the
				 * oprofile_cpu_type string is set to that of
				 * compatibility mode. If the oprofile_cpu_type
				 * already has a value, then we are possibly
				 * overriding a real PVR with a logical one, and,
				 * in that case, keep the current value for
				 * oprofile_cpu_type.
				 */
				if (t->oprofile_cpu_type == NULL)
					t->oprofile_cpu_type = s->oprofile_cpu_type;
1830 1831 1832
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1833 1834 1835 1836 1837

			/*
			 * Set the base platform string once; assumes
			 * we're called with real pvr first.
			 */
1838 1839
			if (*PTRRELOC(&powerpc_base_platform) == NULL)
				*PTRRELOC(&powerpc_base_platform) = t->platform;
1840

1841
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1842
			/* ppc64 and booke expect identify_cpu to also call
1843 1844
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1845
			 * we also don't need to PTRRELOC the function pointer
1846 1847
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1848 1849 1850 1851
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1852
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1853 1854 1855 1856 1857
			return s;
		}
	BUG();
	return NULL;
}