cputable.c 56.4 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 386
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
387 388
		.platform		= "power5+",
	},
389 390 391
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
392 393 394 395
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
396
		.mmu_features		= MMU_FTR_HPTE_TABLE,
397 398 399
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
400
		.pmc_type		= PPC_PMC_IBM,
401 402 403 404 405 406
		.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,
407
		.machine_check		= machine_check_generic,
408 409 410 411 412 413
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
414 415
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
416
		.mmu_features		= MMU_FTR_HPTE_TABLE,
417 418
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
419
		.machine_check		= machine_check_generic,
420 421
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
422 423
		.platform		= "power6",
	},
424 425 426 427 428 429
	{	/* 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,
430
		.mmu_features		= MMU_FTR_HPTE_TABLE,
431 432 433
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_generic,
434 435
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
436 437
		.platform		= "power7",
	},
438 439 440
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
441
		.cpu_name		= "POWER7 (raw)",
442 443
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
444
		.mmu_features		= MMU_FTR_HPTE_TABLE,
445 446 447 448 449 450 451 452 453 454 455 456 457 458
		.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",
	},
459
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
460 461 462 463 464
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
465 466
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
467
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
468 469
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
470
		.num_pmcs		= 4,
471
		.pmc_type		= PPC_PMC_IBM,
472 473
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
474
		.machine_check		= machine_check_generic,
475
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
476
	},
477 478 479 480 481 482
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
483
		.mmu_features		= MMU_FTR_HPTE_TABLE,
484 485 486
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
487
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
488 489
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
490 491
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
492
		.machine_check		= machine_check_generic,
493 494
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
495 496 497 498 499 500
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
501
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
502 503 504
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
505
		.pmc_type		= PPC_PMC_IBM,
506
		.machine_check		= machine_check_generic,
507
		.platform		= "power4",
S
Stephen Rothwell 已提交
508 509 510
	}
#endif	/* CONFIG_PPC64 */
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
511
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
512
	{	/* 601 */
L
Linus Torvalds 已提交
513 514 515
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
516
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
517
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
518
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
519
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
520 521
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
522
		.machine_check		= machine_check_generic,
523
		.platform		= "ppc601",
L
Linus Torvalds 已提交
524 525 526 527 528
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
529
		.cpu_features		= CPU_FTRS_603,
530
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
531
		.mmu_features		= 0,
L
Linus Torvalds 已提交
532 533
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
534
		.cpu_setup		= __setup_cpu_603,
535
		.machine_check		= machine_check_generic,
536
		.platform		= "ppc603",
L
Linus Torvalds 已提交
537 538 539 540 541
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
542
		.cpu_features		= CPU_FTRS_603,
543
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
544
		.mmu_features		= 0,
L
Linus Torvalds 已提交
545 546
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
547
		.cpu_setup		= __setup_cpu_603,
548
		.machine_check		= machine_check_generic,
549
		.platform		= "ppc603",
L
Linus Torvalds 已提交
550 551 552 553 554
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
555
		.cpu_features		= CPU_FTRS_603,
556
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
557
		.mmu_features		= 0,
L
Linus Torvalds 已提交
558 559
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
560
		.cpu_setup		= __setup_cpu_603,
561
		.machine_check		= machine_check_generic,
562
		.platform		= "ppc603",
L
Linus Torvalds 已提交
563 564 565 566 567
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
568
		.cpu_features		= CPU_FTRS_604,
569
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
570
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
571 572 573
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
574
		.cpu_setup		= __setup_cpu_604,
575
		.machine_check		= machine_check_generic,
576
		.platform		= "ppc604",
L
Linus Torvalds 已提交
577 578 579 580 581
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
582
		.cpu_features		= CPU_FTRS_604,
583
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
584
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
585 586 587
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
588
		.cpu_setup		= __setup_cpu_604,
589
		.machine_check		= machine_check_generic,
590
		.platform		= "ppc604",
L
Linus Torvalds 已提交
591 592 593 594 595
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
596
		.cpu_features		= CPU_FTRS_604,
597
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
598
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
599 600 601
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
602
		.cpu_setup		= __setup_cpu_604,
603
		.machine_check		= machine_check_generic,
604
		.platform		= "ppc604",
L
Linus Torvalds 已提交
605 606 607 608 609
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
610
		.cpu_features		= CPU_FTRS_604,
611
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
612
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
613 614 615
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
616
		.cpu_setup		= __setup_cpu_604,
617
		.machine_check		= machine_check_generic,
618
		.platform		= "ppc604",
L
Linus Torvalds 已提交
619 620 621 622 623
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
624
		.cpu_features		= CPU_FTRS_740_NOTAU,
625
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
626
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
627 628 629
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
630
		.cpu_setup		= __setup_cpu_750,
631
		.machine_check		= machine_check_generic,
632
		.platform		= "ppc750",
L
Linus Torvalds 已提交
633 634 635 636 637
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
638
		.cpu_features		= CPU_FTRS_750,
639
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
640
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
641 642 643
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
644
		.cpu_setup		= __setup_cpu_750cx,
645
		.machine_check		= machine_check_generic,
646
		.platform		= "ppc750",
L
Linus Torvalds 已提交
647 648 649 650 651
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
652
		.cpu_features		= CPU_FTRS_750,
653
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
654
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
655 656 657
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
658
		.pmc_type		= PPC_PMC_IBM,
659
		.cpu_setup		= __setup_cpu_750cx,
660
		.machine_check		= machine_check_generic,
661
		.platform		= "ppc750",
L
Linus Torvalds 已提交
662 663 664 665 666
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
667
		.cpu_features		= CPU_FTRS_750,
668
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
669
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
670 671 672
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
673
		.pmc_type		= PPC_PMC_IBM,
674
		.cpu_setup		= __setup_cpu_750cx,
675
		.machine_check		= machine_check_generic,
676
		.platform		= "ppc750",
L
Linus Torvalds 已提交
677
	},
678 679 680 681
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
682
		.cpu_features		= CPU_FTRS_750,
683
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
684
		.mmu_features		= MMU_FTR_HPTE_TABLE,
685 686 687
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
688
		.pmc_type		= PPC_PMC_IBM,
689
		.cpu_setup		= __setup_cpu_750cx,
690
		.machine_check		= machine_check_generic,
691
		.platform		= "ppc750",
692
	},
J
Jake Moilanen 已提交
693 694 695 696
	{	/* 750CL */
		.pvr_mask		= 0xfffff0f0,
		.pvr_value		= 0x00087010,
		.cpu_name		= "750CL",
697
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
698
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
699
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
J
Jake Moilanen 已提交
700 701 702
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
703
		.pmc_type		= PPC_PMC_IBM,
704
		.cpu_setup		= __setup_cpu_750,
705
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
706 707
		.platform		= "ppc750",
	},
708 709 710 711
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
712
		.cpu_features		= CPU_FTRS_750,
713
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
714
		.mmu_features		= MMU_FTR_HPTE_TABLE,
715 716 717
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
718
		.pmc_type		= PPC_PMC_IBM,
719
		.cpu_setup		= __setup_cpu_750,
720
		.machine_check		= machine_check_generic,
721
		.platform		= "ppc750",
722
	},
L
Linus Torvalds 已提交
723 724 725 726
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
727
		.cpu_features		= CPU_FTRS_750FX1,
728
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
729
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
730 731 732
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
733
		.pmc_type		= PPC_PMC_IBM,
734
		.cpu_setup		= __setup_cpu_750,
735
		.machine_check		= machine_check_generic,
736
		.platform		= "ppc750",
737 738
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
739 740 741 742 743
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
744
		.cpu_features		= CPU_FTRS_750FX2,
745
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
746
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
747 748 749
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
750
		.pmc_type		= PPC_PMC_IBM,
751
		.cpu_setup		= __setup_cpu_750,
752
		.machine_check		= machine_check_generic,
753
		.platform		= "ppc750",
754 755
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
756 757 758 759 760
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
761
		.cpu_features		= CPU_FTRS_750FX,
762
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
763
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
764 765 766
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
767
		.pmc_type		= PPC_PMC_IBM,
768
		.cpu_setup		= __setup_cpu_750fx,
769
		.machine_check		= machine_check_generic,
770
		.platform		= "ppc750",
771 772
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
773 774 775 776 777
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
778
		.cpu_features		= CPU_FTRS_750GX,
779
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
780
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
781 782 783
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
784
		.pmc_type		= PPC_PMC_IBM,
785
		.cpu_setup		= __setup_cpu_750fx,
786
		.machine_check		= machine_check_generic,
787
		.platform		= "ppc750",
788 789
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
790 791 792 793 794
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
795
		.cpu_features		= CPU_FTRS_740,
796
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
797
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
798 799 800
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
801
		.pmc_type		= PPC_PMC_IBM,
802
		.cpu_setup		= __setup_cpu_750,
803
		.machine_check		= machine_check_generic,
804
		.platform		= "ppc750",
L
Linus Torvalds 已提交
805 806 807 808 809
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
810
		.cpu_features		= CPU_FTRS_7400_NOTAU,
811 812
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
813
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
814 815 816
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
817
		.pmc_type		= PPC_PMC_G4,
818
		.cpu_setup		= __setup_cpu_7400,
819
		.machine_check		= machine_check_generic,
820
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
821 822 823 824 825
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
826
		.cpu_features		= CPU_FTRS_7400,
827 828
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
829
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
830 831 832
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
833
		.pmc_type		= PPC_PMC_G4,
834
		.cpu_setup		= __setup_cpu_7400,
835
		.machine_check		= machine_check_generic,
836
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
837 838 839 840 841
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
842
		.cpu_features		= CPU_FTRS_7400,
843 844
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
845
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
846 847 848
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
849
		.pmc_type		= PPC_PMC_G4,
850
		.cpu_setup		= __setup_cpu_7410,
851
		.machine_check		= machine_check_generic,
852
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
853 854 855 856 857
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
858
		.cpu_features		= CPU_FTRS_7450_20,
859 860
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
861
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
862 863 864
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
865
		.pmc_type		= PPC_PMC_G4,
866 867
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
868
		.oprofile_type		= PPC_OPROFILE_G4,
869
		.machine_check		= machine_check_generic,
870
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
871 872 873 874 875
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
876
		.cpu_features		= CPU_FTRS_7450_21,
877 878
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
879
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
880 881 882
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
883
		.pmc_type		= PPC_PMC_G4,
884 885
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
886
		.oprofile_type		= PPC_OPROFILE_G4,
887
		.machine_check		= machine_check_generic,
888
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
889 890 891 892 893
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
894
		.cpu_features		= CPU_FTRS_7450_23,
895 896
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
897
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
898 899 900
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
901
		.pmc_type		= PPC_PMC_G4,
902 903
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
904
		.oprofile_type		= PPC_OPROFILE_G4,
905
		.machine_check		= machine_check_generic,
906
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
907 908 909 910 911
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
912
		.cpu_features		= CPU_FTRS_7455_1,
913 914
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
915
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
916 917 918
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
919
		.pmc_type		= PPC_PMC_G4,
920 921
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
922
		.oprofile_type		= PPC_OPROFILE_G4,
923
		.machine_check		= machine_check_generic,
924
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
925 926 927 928 929
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
930
		.cpu_features		= CPU_FTRS_7455_20,
931 932
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
933
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
934 935 936
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
937
		.pmc_type		= PPC_PMC_G4,
938 939
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
940
		.oprofile_type		= PPC_OPROFILE_G4,
941
		.machine_check		= machine_check_generic,
942
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
943 944 945 946 947
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
948
		.cpu_features		= CPU_FTRS_7455,
949 950
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
951
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
952 953 954
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
955
		.pmc_type		= PPC_PMC_G4,
956 957
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
958
		.oprofile_type		= PPC_OPROFILE_G4,
959
		.machine_check		= machine_check_generic,
960
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
961 962 963 964 965
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
966
		.cpu_features		= CPU_FTRS_7447_10,
967 968
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
969
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
970 971 972
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
973
		.pmc_type		= PPC_PMC_G4,
974 975
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
976
		.oprofile_type		= PPC_OPROFILE_G4,
977
		.machine_check		= machine_check_generic,
978
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
979 980 981 982 983
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
984
		.cpu_features		= CPU_FTRS_7447_10,
985 986
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
987
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
988 989 990
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
991
		.pmc_type		= PPC_PMC_G4,
992 993
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
994
		.oprofile_type		= PPC_OPROFILE_G4,
995
		.machine_check		= machine_check_generic,
996
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
997 998 999 1000 1001
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
1002
		.cpu_features		= CPU_FTRS_7447,
1003
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1004
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1005 1006 1007
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1008
		.pmc_type		= PPC_PMC_G4,
1009 1010
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1011
		.oprofile_type		= PPC_OPROFILE_G4,
1012
		.machine_check		= machine_check_generic,
1013
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1014 1015 1016 1017 1018
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
1019
		.cpu_features		= CPU_FTRS_7447A,
1020 1021
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1022
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1023 1024 1025
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1026
		.pmc_type		= PPC_PMC_G4,
1027 1028
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1029
		.oprofile_type		= PPC_OPROFILE_G4,
1030
		.machine_check		= machine_check_generic,
1031
		.platform		= "ppc7450",
1032 1033 1034 1035 1036
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
1037
		.cpu_features		= CPU_FTRS_7448,
1038 1039
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1040
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1041 1042 1043
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1044
		.pmc_type		= PPC_PMC_G4,
1045 1046
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1047
		.oprofile_type		= PPC_OPROFILE_G4,
1048
		.machine_check		= machine_check_generic,
1049
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1050 1051 1052 1053 1054
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
1055
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
1056
		.cpu_user_features	= COMMON_USER,
1057
		.mmu_features		= 0,
L
Linus Torvalds 已提交
1058 1059
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1060
		.cpu_setup		= __setup_cpu_603,
1061
		.machine_check		= machine_check_generic,
1062
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1063 1064 1065 1066 1067
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
1068
		.cpu_features		= CPU_FTRS_G2_LE,
S
Stephen Rothwell 已提交
1069
		.cpu_user_features	= COMMON_USER,
1070
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1071 1072
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1073
		.cpu_setup		= __setup_cpu_603,
1074
		.machine_check		= machine_check_generic,
1075
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1076
	},
1077
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
1078 1079
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
1080
		.cpu_name		= "e300c1",
1081
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
1082
		.cpu_user_features	= COMMON_USER,
1083
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1084 1085
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1086
		.cpu_setup		= __setup_cpu_603,
1087
		.machine_check		= machine_check_generic,
1088
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1089
	},
1090 1091 1092 1093
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
1094
		.cpu_features		= CPU_FTRS_E300C2,
1095
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1096 1097
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1098 1099 1100
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1101
		.machine_check		= machine_check_generic,
1102 1103
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1104
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1105 1106 1107 1108 1109
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1110 1111
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1112 1113 1114
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1115 1116 1117
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1118 1119
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1120 1121 1122 1123 1124 1125
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1126 1127
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
L
Li Yang 已提交
1128 1129 1130
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1131
		.machine_check		= machine_check_generic,
1132 1133 1134
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
L
Li Yang 已提交
1135 1136
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
1137 1138 1139 1140
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1141
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
1142
		.cpu_user_features	= COMMON_USER,
1143
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
1144 1145
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1146
		.machine_check		= machine_check_generic,
1147
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1148 1149 1150 1151 1152 1153 1154 1155 1156
	},
#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.... */
1157
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
1158
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1159
		.mmu_features		= MMU_FTR_TYPE_8xx,
L
Linus Torvalds 已提交
1160 1161
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1162
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1163 1164 1165 1166 1167 1168 1169
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1170
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1171
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1172
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1173 1174
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1175
		.machine_check		= machine_check_4xx,
1176
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1177 1178 1179 1180 1181
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1182
		.cpu_features		= CPU_FTRS_40X,
1183 1184
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1185
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1186 1187
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1188
		.machine_check		= machine_check_4xx,
1189
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1190 1191 1192 1193 1194
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1195
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1196
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1197
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1198 1199
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1200
		.machine_check		= machine_check_4xx,
1201
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1202 1203 1204 1205 1206
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1207
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1208 1209
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1210
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1211 1212
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1213
		.machine_check		= machine_check_4xx,
1214
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1215 1216 1217 1218 1219
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1220
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1221 1222
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1223
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1224 1225
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1226
		.machine_check		= machine_check_4xx,
1227
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1228 1229 1230 1231 1232
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1233
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1234 1235
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1236
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1237 1238
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1239
		.machine_check		= machine_check_4xx,
1240
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1241 1242 1243 1244 1245
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1246
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1247 1248
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1249
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1250 1251
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1252
		.machine_check		= machine_check_4xx,
1253
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1254 1255 1256 1257 1258
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1259
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1260 1261
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1262
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1263 1264
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1265
		.machine_check		= machine_check_4xx,
1266
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1267 1268 1269 1270 1271
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1272
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1273 1274
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1275
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1276 1277
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1278
		.machine_check		= machine_check_4xx,
1279
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1280 1281 1282 1283 1284
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1285
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1286 1287
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1288
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1289 1290
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1291
		.machine_check		= machine_check_4xx,
1292
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1293 1294 1295 1296 1297
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1298
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1299 1300
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1301
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1302 1303
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1304
		.machine_check		= machine_check_4xx,
1305
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1306 1307 1308 1309 1310
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1311
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1312
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1313
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1314 1315
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1316
		.machine_check		= machine_check_4xx,
1317
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1318 1319
	},
	{	/* Xilinx Virtex-II Pro  */
1320
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1321 1322
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1323
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1324 1325
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1326
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1327 1328
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1329
		.machine_check		= machine_check_4xx,
1330
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1331
	},
1332 1333 1334 1335 1336 1337 1338
	{	/* 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,
1339
		.mmu_features		= MMU_FTR_TYPE_40x,
1340 1341
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1342
		.machine_check		= machine_check_4xx,
1343
		.platform		= "ppc405",
1344
	},
1345 1346 1347 1348
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1349
		.cpu_features		= CPU_FTRS_40X,
1350 1351
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1352
		.mmu_features		= MMU_FTR_TYPE_40x,
1353 1354
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1355
		.machine_check		= machine_check_4xx,
1356 1357 1358
		.platform		= "ppc405",
	},
	{	/* 405EX */
1359 1360
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910004,
1361 1362
		.cpu_name		= "405EX",
		.cpu_features		= CPU_FTRS_40X,
1363 1364
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1365
		.mmu_features		= MMU_FTR_TYPE_40x,
1366 1367
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1368
		.machine_check		= machine_check_4xx,
1369
		.platform		= "ppc405",
1370
	},
1371 1372 1373 1374 1375 1376 1377
	{	/* 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,
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 1391
	{
		/* 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,
1392
		.mmu_features		= MMU_FTR_TYPE_40x,
1393 1394 1395 1396 1397
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1398 1399 1400 1401 1402 1403 1404
	{	/* 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,
1405
		.mmu_features		= MMU_FTR_TYPE_40x,
1406 1407 1408 1409 1410
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	}
L
Linus Torvalds 已提交
1411 1412 1413

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

1800 1801
static struct cpu_spec the_cpu_spec;

1802
static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1803
{
1804
	struct cpu_spec *t = &the_cpu_spec;
1805 1806
	struct cpu_spec old;

1807
	t = PTRRELOC(t);
1808 1809 1810 1811
	old = *t;

	/* Copy everything, then do fixups */
	*t = *s;
1812

1813 1814 1815 1816 1817
	/*
	 * 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.
	 */
1818 1819 1820 1821 1822 1823 1824 1825
	if (old.num_pmcs && !s->num_pmcs) {
		t->num_pmcs = old.num_pmcs;
		t->pmc_type = old.pmc_type;
		t->oprofile_type = old.oprofile_type;
		t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
		t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
		t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;

1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838
		/*
		 * 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.
		 */
1839
		if (old.oprofile_cpu_type == NULL) {
1840 1841
			t->oprofile_cpu_type = old.oprofile_cpu_type;
			t->oprofile_type = old.oprofile_type;
1842
		}
1843
	}
1844 1845

	*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1846

1847 1848 1849 1850 1851 1852
	/*
	 * Set the base platform string once; assumes
	 * we're called with real pvr first.
	 */
	if (*PTRRELOC(&powerpc_base_platform) == NULL)
		*PTRRELOC(&powerpc_base_platform) = t->platform;
1853

1854
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1855 1856 1857 1858 1859 1860 1861 1862 1863
	/* ppc64 and booke expect identify_cpu to also call setup_cpu for
	 * that processor. I will consolidate that at a later time, for now,
	 * just use #ifdef. We also don't need to PTRRELOC the function
	 * pointer on ppc64 and booke as we are running at 0 in real mode
	 * on ppc64 and reloc_offset is always 0 on booke.
	 */
	if (s->cpu_setup) {
		s->cpu_setup(offset, s);
	}
1864
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876
}

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
{
	struct cpu_spec *s = cpu_specs;
	int i;

	s = PTRRELOC(s);

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
		if ((pvr & s->pvr_mask) == s->pvr_value) {
			setup_cpu_spec(offset, s);
1877 1878
			return s;
		}
1879 1880
	}

1881
	BUG();
1882

1883 1884
	return NULL;
}