cputable.c 55.3 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 51 52 53 54 55 56 57
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 已提交
58
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
59
#ifdef CONFIG_PPC64
60
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
61
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
62
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
63
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
64
extern void __restore_cpu_ppc970(void);
65 66
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
67
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
68 69 70 71

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

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

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

1771 1772 1773
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1774 1775
{
	struct cpu_spec *s = cpu_specs;
1776
	struct cpu_spec *t = &the_cpu_spec;
1777 1778 1779
	int i;

	s = PTRRELOC(s);
1780
	t = PTRRELOC(t);
1781 1782 1783

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798
			/*
			 * 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;
1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815
				/*
				 * 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;
1816 1817 1818
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1819 1820 1821 1822 1823

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

1827
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1828
			/* ppc64 and booke expect identify_cpu to also call
1829 1830
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1831
			 * we also don't need to PTRRELOC the function pointer
1832 1833
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1834 1835 1836 1837
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1838
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1839 1840 1841 1842 1843
			return s;
		}
	BUG();
	return NULL;
}