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

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

104
static struct cpu_spec __initdata cpu_specs[] = {
105
#ifdef CONFIG_PPC_BOOK3S_64
S
Stephen Rothwell 已提交
106 107 108 109 110
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
111
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
112
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
113 114 115
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
116
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
117
		.oprofile_cpu_type	= "ppc64/power3",
118
		.oprofile_type		= PPC_OPROFILE_RS64,
119
		.platform		= "power3",
S
Stephen Rothwell 已提交
120 121 122 123 124 125
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
126
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
127
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
128 129 130
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
131
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
132
		.oprofile_cpu_type	= "ppc64/power3",
133
		.oprofile_type		= PPC_OPROFILE_RS64,
134
		.platform		= "power3",
S
Stephen Rothwell 已提交
135 136 137 138 139 140 141
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
142
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
143 144 145
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
146
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
147
		.oprofile_cpu_type	= "ppc64/rs64",
148
		.oprofile_type		= PPC_OPROFILE_RS64,
149
		.platform		= "rs64",
S
Stephen Rothwell 已提交
150 151 152 153 154 155 156
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
157
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
158 159 160
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
161
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
162
		.oprofile_cpu_type	= "ppc64/rs64",
163
		.oprofile_type		= PPC_OPROFILE_RS64,
164
		.platform		= "rs64",
S
Stephen Rothwell 已提交
165 166 167 168 169 170 171
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
172
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
173 174 175
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
176
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
177
		.oprofile_cpu_type	= "ppc64/rs64",
178
		.oprofile_type		= PPC_OPROFILE_RS64,
179
		.platform		= "rs64",
S
Stephen Rothwell 已提交
180 181 182 183 184 185 186
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
187
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
188 189 190
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
191
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
192
		.oprofile_cpu_type	= "ppc64/rs64",
193
		.oprofile_type		= PPC_OPROFILE_RS64,
194
		.platform		= "rs64",
S
Stephen Rothwell 已提交
195 196 197 198 199 200
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
201
		.cpu_user_features	= COMMON_USER_POWER4,
202
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
203 204 205
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
206
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
207
		.oprofile_cpu_type	= "ppc64/power4",
208
		.oprofile_type		= PPC_OPROFILE_POWER4,
209
		.platform		= "power4",
S
Stephen Rothwell 已提交
210 211 212 213 214 215
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
216
		.cpu_user_features	= COMMON_USER_POWER4,
217
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
218 219 220
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
221
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
222
		.oprofile_cpu_type	= "ppc64/power4",
223
		.oprofile_type		= PPC_OPROFILE_POWER4,
224
		.platform		= "power4",
S
Stephen Rothwell 已提交
225 226 227 228 229 230
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
231
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
232
			PPC_FEATURE_HAS_ALTIVEC_COMP,
233
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
234 235 236
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
237
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
238
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
239
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
240
		.oprofile_cpu_type	= "ppc64/970",
241
		.oprofile_type		= PPC_OPROFILE_POWER4,
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
		.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 278
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
279 280 281 282 283 284
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
285
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
286
			PPC_FEATURE_HAS_ALTIVEC_COMP,
287
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
288 289
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
290
		.num_pmcs		= 8,
291
		.pmc_type		= PPC_PMC_IBM,
292
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
293
		.cpu_restore		= __restore_cpu_ppc970,
294
		.oprofile_cpu_type	= "ppc64/970MP",
295
		.oprofile_type		= PPC_OPROFILE_POWER4,
296
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
297
	},
J
Jake Moilanen 已提交
298 299 300 301 302 303 304
	{	/* 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,
305
		.mmu_features		= MMU_FTR_HPTE_TABLE,
J
Jake Moilanen 已提交
306 307 308
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
309
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
310 311 312 313 314
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "ppc970",
	},
315
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
316 317 318 319
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
320
		.cpu_user_features	= COMMON_USER_POWER5,
321
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
322 323 324
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
325
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
326
		.oprofile_cpu_type	= "ppc64/power5",
327
		.oprofile_type		= PPC_OPROFILE_POWER4,
328 329 330 331 332
		/* 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,
333
		.platform		= "power5",
S
Stephen Rothwell 已提交
334
	},
335 336 337 338 339 340
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
341
		.mmu_features		= MMU_FTR_HPTE_TABLE,
342 343 344 345 346 347 348 349 350
		.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,
		.platform		= "power5+",
	},
351
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
352 353
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
354
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
355
		.cpu_features		= CPU_FTRS_POWER5,
356
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
357
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
358 359 360
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
361
		.pmc_type		= PPC_PMC_IBM,
362
		.oprofile_cpu_type	= "ppc64/power5+",
363
		.oprofile_type		= PPC_OPROFILE_POWER4,
364 365
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
366
		.platform		= "power5+",
S
Stephen Rothwell 已提交
367
	},
368 369 370 371 372 373
	{	/* 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,
374
		.mmu_features		= MMU_FTR_HPTE_TABLE,
375 376
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
377 378
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
379 380
		.platform		= "power5+",
	},
381 382 383
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
384 385 386 387
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
388
		.mmu_features		= MMU_FTR_HPTE_TABLE,
389 390 391
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
392
		.pmc_type		= PPC_PMC_IBM,
393 394 395 396 397 398 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,
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
405 406
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
407
		.mmu_features		= MMU_FTR_HPTE_TABLE,
408 409
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
410 411
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
412 413
		.platform		= "power6",
	},
414 415 416 417 418 419
	{	/* 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,
420 421
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
422 423
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
424 425
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
426 427
		.platform		= "power7",
	},
428 429 430
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
431
		.cpu_name		= "POWER7 (raw)",
432 433
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
434 435
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
436 437 438 439 440 441 442 443
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.pmc_type		= PPC_PMC_IBM,
		.oprofile_cpu_type	= "ppc64/power7",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "power7",
	},
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
	{	/* Power7+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x004A0000,
		.cpu_name		= "POWER7+ (raw)",
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.pmc_type		= PPC_PMC_IBM,
		.oprofile_cpu_type	= "ppc64/power7",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.platform		= "power7+",
	},
460
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
461 462 463 464 465
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
466 467
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
468
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
469 470
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
471
		.num_pmcs		= 4,
472
		.pmc_type		= PPC_PMC_IBM,
473 474
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
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 493
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
494 495 496 497 498 499
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
500
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
501 502 503
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
504
		.pmc_type		= PPC_PMC_IBM,
505
		.platform		= "power4",
S
Stephen Rothwell 已提交
506
	}
507 508
#endif	/* CONFIG_PPC_BOOK3S_64 */

S
Stephen Rothwell 已提交
509
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
510
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
511
	{	/* 601 */
L
Linus Torvalds 已提交
512 513 514
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
515
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
516
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
517
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
518
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
519 520
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
521
		.machine_check		= machine_check_generic,
522
		.platform		= "ppc601",
L
Linus Torvalds 已提交
523 524 525 526 527
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
528
		.cpu_features		= CPU_FTRS_603,
529
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
530
		.mmu_features		= 0,
L
Linus Torvalds 已提交
531 532
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
533
		.cpu_setup		= __setup_cpu_603,
534
		.machine_check		= machine_check_generic,
535
		.platform		= "ppc603",
L
Linus Torvalds 已提交
536 537 538 539 540
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
541
		.cpu_features		= CPU_FTRS_603,
542
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
543
		.mmu_features		= 0,
L
Linus Torvalds 已提交
544 545
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
546
		.cpu_setup		= __setup_cpu_603,
547
		.machine_check		= machine_check_generic,
548
		.platform		= "ppc603",
L
Linus Torvalds 已提交
549 550 551 552 553
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
554
		.cpu_features		= CPU_FTRS_603,
555
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
556
		.mmu_features		= 0,
L
Linus Torvalds 已提交
557 558
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
559
		.cpu_setup		= __setup_cpu_603,
560
		.machine_check		= machine_check_generic,
561
		.platform		= "ppc603",
L
Linus Torvalds 已提交
562 563 564 565 566
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
567
		.cpu_features		= CPU_FTRS_604,
568
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
569
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
570 571 572
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
573
		.cpu_setup		= __setup_cpu_604,
574
		.machine_check		= machine_check_generic,
575
		.platform		= "ppc604",
L
Linus Torvalds 已提交
576 577 578 579 580
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
581
		.cpu_features		= CPU_FTRS_604,
582
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
583
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
584 585 586
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
587
		.cpu_setup		= __setup_cpu_604,
588
		.machine_check		= machine_check_generic,
589
		.platform		= "ppc604",
L
Linus Torvalds 已提交
590 591 592 593 594
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
595
		.cpu_features		= CPU_FTRS_604,
596
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
597
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
598 599 600
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
601
		.cpu_setup		= __setup_cpu_604,
602
		.machine_check		= machine_check_generic,
603
		.platform		= "ppc604",
L
Linus Torvalds 已提交
604 605 606 607 608
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
609
		.cpu_features		= CPU_FTRS_604,
610
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
611
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
612 613 614
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
615
		.cpu_setup		= __setup_cpu_604,
616
		.machine_check		= machine_check_generic,
617
		.platform		= "ppc604",
L
Linus Torvalds 已提交
618 619 620 621 622
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
623
		.cpu_features		= CPU_FTRS_740_NOTAU,
624
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
625
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
626 627 628
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
629
		.cpu_setup		= __setup_cpu_750,
630
		.machine_check		= machine_check_generic,
631
		.platform		= "ppc750",
L
Linus Torvalds 已提交
632 633 634 635 636
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
637
		.cpu_features		= CPU_FTRS_750,
638
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
639
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
640 641 642
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
643
		.cpu_setup		= __setup_cpu_750cx,
644
		.machine_check		= machine_check_generic,
645
		.platform		= "ppc750",
L
Linus Torvalds 已提交
646 647 648 649 650
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
651
		.cpu_features		= CPU_FTRS_750,
652
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
653
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
654 655 656
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
657
		.pmc_type		= PPC_PMC_IBM,
658
		.cpu_setup		= __setup_cpu_750cx,
659
		.machine_check		= machine_check_generic,
660
		.platform		= "ppc750",
L
Linus Torvalds 已提交
661 662 663 664 665
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
666
		.cpu_features		= CPU_FTRS_750,
667
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
668
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
669 670 671
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
672
		.pmc_type		= PPC_PMC_IBM,
673
		.cpu_setup		= __setup_cpu_750cx,
674
		.machine_check		= machine_check_generic,
675
		.platform		= "ppc750",
L
Linus Torvalds 已提交
676
	},
677 678 679 680
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
681
		.cpu_features		= CPU_FTRS_750,
682
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
683
		.mmu_features		= MMU_FTR_HPTE_TABLE,
684 685 686
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
687
		.pmc_type		= PPC_PMC_IBM,
688
		.cpu_setup		= __setup_cpu_750cx,
689
		.machine_check		= machine_check_generic,
690
		.platform		= "ppc750",
691
	},
692 693 694
	{	/* 750CL (and "Broadway") */
		.pvr_mask		= 0xfffff0e0,
		.pvr_value		= 0x00087000,
J
Jake Moilanen 已提交
695
		.cpu_name		= "750CL",
696
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
697
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
698
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
J
Jake Moilanen 已提交
699 700 701
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
702
		.pmc_type		= PPC_PMC_IBM,
703
		.cpu_setup		= __setup_cpu_750,
704
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
705
		.platform		= "ppc750",
706 707
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
J
Jake Moilanen 已提交
708
	},
709 710 711 712
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
713
		.cpu_features		= CPU_FTRS_750,
714
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
715
		.mmu_features		= MMU_FTR_HPTE_TABLE,
716 717 718
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
719
		.pmc_type		= PPC_PMC_IBM,
720
		.cpu_setup		= __setup_cpu_750,
721
		.machine_check		= machine_check_generic,
722
		.platform		= "ppc750",
723
	},
L
Linus Torvalds 已提交
724 725 726 727
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
728
		.cpu_features		= CPU_FTRS_750FX1,
729
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
730
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
731 732 733
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
734
		.pmc_type		= PPC_PMC_IBM,
735
		.cpu_setup		= __setup_cpu_750,
736
		.machine_check		= machine_check_generic,
737
		.platform		= "ppc750",
738 739
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
740 741 742 743 744
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
745
		.cpu_features		= CPU_FTRS_750FX2,
746
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
747
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
748 749 750
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
751
		.pmc_type		= PPC_PMC_IBM,
752
		.cpu_setup		= __setup_cpu_750,
753
		.machine_check		= machine_check_generic,
754
		.platform		= "ppc750",
755 756
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
757 758 759 760 761
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
762
		.cpu_features		= CPU_FTRS_750FX,
763
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
764
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
765 766 767
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
768
		.pmc_type		= PPC_PMC_IBM,
769
		.cpu_setup		= __setup_cpu_750fx,
770
		.machine_check		= machine_check_generic,
771
		.platform		= "ppc750",
772 773
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
774 775 776 777 778
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
779
		.cpu_features		= CPU_FTRS_750GX,
780
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
781
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
782 783 784
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
785
		.pmc_type		= PPC_PMC_IBM,
786
		.cpu_setup		= __setup_cpu_750fx,
787
		.machine_check		= machine_check_generic,
788
		.platform		= "ppc750",
789 790
		.oprofile_cpu_type      = "ppc/750",
		.oprofile_type		= PPC_OPROFILE_G4,
L
Linus Torvalds 已提交
791 792 793 794 795
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
796
		.cpu_features		= CPU_FTRS_740,
797
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
798
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
799 800 801
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
802
		.pmc_type		= PPC_PMC_IBM,
803
		.cpu_setup		= __setup_cpu_750,
804
		.machine_check		= machine_check_generic,
805
		.platform		= "ppc750",
L
Linus Torvalds 已提交
806 807 808 809 810
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
811
		.cpu_features		= CPU_FTRS_7400_NOTAU,
812 813
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
814
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
815 816 817
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
818
		.pmc_type		= PPC_PMC_G4,
819
		.cpu_setup		= __setup_cpu_7400,
820
		.machine_check		= machine_check_generic,
821
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
822 823 824 825 826
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
827
		.cpu_features		= CPU_FTRS_7400,
828 829
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
830
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
831 832 833
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
834
		.pmc_type		= PPC_PMC_G4,
835
		.cpu_setup		= __setup_cpu_7400,
836
		.machine_check		= machine_check_generic,
837
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
838 839 840 841 842
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
843
		.cpu_features		= CPU_FTRS_7400,
844 845
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
846
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
847 848 849
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
850
		.pmc_type		= PPC_PMC_G4,
851
		.cpu_setup		= __setup_cpu_7410,
852
		.machine_check		= machine_check_generic,
853
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
854 855 856 857 858
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
859
		.cpu_features		= CPU_FTRS_7450_20,
860 861
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
862
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
863 864 865
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
866
		.pmc_type		= PPC_PMC_G4,
867 868
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
869
		.oprofile_type		= PPC_OPROFILE_G4,
870
		.machine_check		= machine_check_generic,
871
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
872 873 874 875 876
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
877
		.cpu_features		= CPU_FTRS_7450_21,
878 879
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
880
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
881 882 883
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
884
		.pmc_type		= PPC_PMC_G4,
885 886
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
887
		.oprofile_type		= PPC_OPROFILE_G4,
888
		.machine_check		= machine_check_generic,
889
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
890 891 892 893 894
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
895
		.cpu_features		= CPU_FTRS_7450_23,
896 897
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
898
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
899 900 901
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
902
		.pmc_type		= PPC_PMC_G4,
903 904
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
905
		.oprofile_type		= PPC_OPROFILE_G4,
906
		.machine_check		= machine_check_generic,
907
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
908 909 910 911 912
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
913
		.cpu_features		= CPU_FTRS_7455_1,
914 915
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
916
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
917 918 919
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
920
		.pmc_type		= PPC_PMC_G4,
921 922
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
923
		.oprofile_type		= PPC_OPROFILE_G4,
924
		.machine_check		= machine_check_generic,
925
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
926 927 928 929 930
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
931
		.cpu_features		= CPU_FTRS_7455_20,
932 933
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
934
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
935 936 937
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
938
		.pmc_type		= PPC_PMC_G4,
939 940
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
941
		.oprofile_type		= PPC_OPROFILE_G4,
942
		.machine_check		= machine_check_generic,
943
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
944 945 946 947 948
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
949
		.cpu_features		= CPU_FTRS_7455,
950 951
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
952
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
953 954 955
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
956
		.pmc_type		= PPC_PMC_G4,
957 958
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
959
		.oprofile_type		= PPC_OPROFILE_G4,
960
		.machine_check		= machine_check_generic,
961
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
962 963 964 965 966
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
967
		.cpu_features		= CPU_FTRS_7447_10,
968 969
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
970
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
971 972 973
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
974
		.pmc_type		= PPC_PMC_G4,
975 976
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
977
		.oprofile_type		= PPC_OPROFILE_G4,
978
		.machine_check		= machine_check_generic,
979
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
980 981 982 983 984
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
985
		.cpu_features		= CPU_FTRS_7447_10,
986 987
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
988
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
989 990 991
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
992
		.pmc_type		= PPC_PMC_G4,
993 994
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
995
		.oprofile_type		= PPC_OPROFILE_G4,
996
		.machine_check		= machine_check_generic,
997
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
998 999 1000 1001 1002
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
1003
		.cpu_features		= CPU_FTRS_7447,
1004
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1005
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1006 1007 1008
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1009
		.pmc_type		= PPC_PMC_G4,
1010 1011
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1012
		.oprofile_type		= PPC_OPROFILE_G4,
1013
		.machine_check		= machine_check_generic,
1014
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1015 1016 1017 1018 1019
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
1020
		.cpu_features		= CPU_FTRS_7447A,
1021 1022
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1023
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1024 1025 1026
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1027
		.pmc_type		= PPC_PMC_G4,
1028 1029
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1030
		.oprofile_type		= PPC_OPROFILE_G4,
1031
		.machine_check		= machine_check_generic,
1032
		.platform		= "ppc7450",
1033 1034 1035 1036 1037
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
1038
		.cpu_features		= CPU_FTRS_7448,
1039 1040
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
1041
		.mmu_features		= MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1042 1043 1044
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
1045
		.pmc_type		= PPC_PMC_G4,
1046 1047
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
1048
		.oprofile_type		= PPC_OPROFILE_G4,
1049
		.machine_check		= machine_check_generic,
1050
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
1051 1052 1053 1054 1055
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
1056
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
1057
		.cpu_user_features	= COMMON_USER,
1058
		.mmu_features		= 0,
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 1066 1067 1068
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
1069
		.cpu_features		= CPU_FTRS_G2_LE,
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
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
1079 1080
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
1081
		.cpu_name		= "e300c1",
1082
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
1083
		.cpu_user_features	= COMMON_USER,
1084
		.mmu_features		= MMU_FTR_USE_HIGH_BATS,
L
Linus Torvalds 已提交
1085 1086
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1087
		.cpu_setup		= __setup_cpu_603,
1088
		.machine_check		= machine_check_generic,
1089
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1090
	},
1091 1092 1093 1094
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
1095
		.cpu_features		= CPU_FTRS_E300C2,
1096
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1097 1098
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1099 1100 1101
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1102
		.machine_check		= machine_check_generic,
1103 1104
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1105
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1106 1107 1108 1109 1110
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1111 1112
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
1113 1114 1115
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1116 1117 1118
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1119 1120
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1121 1122 1123 1124 1125 1126
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
1127 1128
		.mmu_features		= MMU_FTR_USE_HIGH_BATS |
			MMU_FTR_NEED_DTLB_SW_LRU,
L
Li Yang 已提交
1129 1130 1131
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1132
		.machine_check		= machine_check_generic,
1133 1134 1135
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
L
Li Yang 已提交
1136 1137
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
1138 1139 1140 1141
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1142
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
1143
		.cpu_user_features	= COMMON_USER,
1144
		.mmu_features		= MMU_FTR_HPTE_TABLE,
L
Linus Torvalds 已提交
1145 1146
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1147
		.machine_check		= machine_check_generic,
1148
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1149 1150 1151 1152 1153 1154 1155 1156 1157
	},
#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.... */
1158
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
1159
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1160
		.mmu_features		= MMU_FTR_TYPE_8xx,
L
Linus Torvalds 已提交
1161 1162
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1163
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1164 1165 1166 1167 1168 1169 1170
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1171
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1172
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1173
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1174 1175
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1176
		.machine_check		= machine_check_4xx,
1177
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1178 1179 1180 1181 1182
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1183
		.cpu_features		= CPU_FTRS_40X,
1184 1185
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1186
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1187 1188
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1189
		.machine_check		= machine_check_4xx,
1190
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1191 1192 1193 1194 1195
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1196
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1197
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1198
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1199 1200
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1201
		.machine_check		= machine_check_4xx,
1202
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1203 1204 1205 1206 1207
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1208
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1209 1210
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1211
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1212 1213
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1214
		.machine_check		= machine_check_4xx,
1215
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1216 1217 1218 1219 1220
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1221
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1222 1223
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1224
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1225 1226
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1227
		.machine_check		= machine_check_4xx,
1228
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1229 1230 1231 1232 1233
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1234
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1235 1236
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1237
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1238 1239
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1240
		.machine_check		= machine_check_4xx,
1241
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1242 1243 1244 1245 1246
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1247
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1248 1249
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1250
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1251 1252
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1253
		.machine_check		= machine_check_4xx,
1254
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1255 1256 1257 1258 1259
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1260
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1261 1262
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1263
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1264 1265
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1266
		.machine_check		= machine_check_4xx,
1267
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1268 1269 1270 1271 1272
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1273
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1274 1275
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1276
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1277 1278
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1279
		.machine_check		= machine_check_4xx,
1280
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1281 1282 1283 1284 1285
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1286
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1287 1288
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1289
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1290 1291
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1292
		.machine_check		= machine_check_4xx,
1293
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1294 1295 1296 1297 1298
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1299
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1300 1301
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1302
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1303 1304
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1305
		.machine_check		= machine_check_4xx,
1306
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1307 1308 1309 1310 1311
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1312
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1313
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1314
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1315 1316
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1317
		.machine_check		= machine_check_4xx,
1318
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1319 1320
	},
	{	/* Xilinx Virtex-II Pro  */
1321
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1322 1323
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1324
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1325 1326
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1327
		.mmu_features		= MMU_FTR_TYPE_40x,
L
Linus Torvalds 已提交
1328 1329
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1330
		.machine_check		= machine_check_4xx,
1331
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1332
	},
1333 1334 1335 1336 1337 1338 1339
	{	/* 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,
1340
		.mmu_features		= MMU_FTR_TYPE_40x,
1341 1342
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1343
		.machine_check		= machine_check_4xx,
1344
		.platform		= "ppc405",
1345
	},
1346 1347 1348 1349
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1350
		.cpu_features		= CPU_FTRS_40X,
1351 1352
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1353
		.mmu_features		= MMU_FTR_TYPE_40x,
1354 1355
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1356
		.machine_check		= machine_check_4xx,
1357 1358
		.platform		= "ppc405",
	},
1359 1360 1361 1362
	{	/* 405EX Rev. A/B with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910007,
		.cpu_name		= "405EX Rev. A/B",
1363
		.cpu_features		= CPU_FTRS_40X,
1364 1365
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1366
		.mmu_features		= MMU_FTR_TYPE_40x,
1367 1368
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1369
		.machine_check		= machine_check_4xx,
1370
		.platform		= "ppc405",
1371
	},
1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464
	{	/* 405EX Rev. C without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000d,
		.cpu_name		= "405EX Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. C with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000f,
		.cpu_name		= "405EX Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. D without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910003,
		.cpu_name		= "405EX Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EX Rev. D with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910005,
		.cpu_name		= "405EX Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. A/B without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910001,
		.cpu_name		= "405EXr Rev. A/B",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. C without Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910009,
		.cpu_name		= "405EXr Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. C with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x1291000b,
		.cpu_name		= "405EXr Rev. C",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. D without Security */
		.pvr_mask		= 0xffff000f,
1465
		.pvr_value		= 0x12910000,
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479
		.cpu_name		= "405EXr Rev. D",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.mmu_features		= MMU_FTR_TYPE_40x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
	{	/* 405EXr Rev. D with Security */
		.pvr_mask		= 0xffff000f,
		.pvr_value		= 0x12910002,
		.cpu_name		= "405EXr Rev. D",
1480 1481 1482
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1483
		.mmu_features		= MMU_FTR_TYPE_40x,
1484 1485 1486 1487 1488
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1489 1490 1491 1492 1493 1494 1495 1496
	{
		/* 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,
1497
		.mmu_features		= MMU_FTR_TYPE_40x,
1498 1499 1500 1501 1502
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1503 1504 1505 1506 1507 1508 1509
	{	/* 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,
1510
		.mmu_features		= MMU_FTR_TYPE_40x,
1511 1512 1513 1514 1515
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	}
L
Linus Torvalds 已提交
1516 1517 1518

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1519 1520 1521
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1522 1523 1524
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1525
		.mmu_features		= MMU_FTR_TYPE_44x,
1526 1527
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1528
		.machine_check		= machine_check_4xx,
1529 1530 1531 1532 1533
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1534
		.cpu_name		= "440EP Rev. A",
1535
		.cpu_features		= CPU_FTRS_44X,
1536
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1537
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1538 1539
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1540
		.cpu_setup		= __setup_cpu_440ep,
1541
		.machine_check		= machine_check_4xx,
1542
		.platform		= "ppc440",
M
Matt Porter 已提交
1543 1544 1545 1546
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1547
		.cpu_name		= "440GR Rev. B",
1548
		.cpu_features		= CPU_FTRS_44X,
1549
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1550
		.mmu_features		= MMU_FTR_TYPE_44x,
M
Matt Porter 已提交
1551 1552
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1553
		.machine_check		= machine_check_4xx,
1554
		.platform		= "ppc440",
M
Matt Porter 已提交
1555
	},
1556 1557 1558 1559 1560 1561
	{ /* 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,
1562
		.mmu_features		= MMU_FTR_TYPE_44x,
1563 1564 1565 1566 1567 1568
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440ep,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	},
1569 1570 1571 1572
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1573 1574
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1575
		.mmu_features		= MMU_FTR_TYPE_44x,
1576 1577
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1578
		.cpu_setup		= __setup_cpu_440ep,
1579
		.machine_check		= machine_check_4xx,
1580
		.platform		= "ppc440",
1581 1582 1583
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1584
		.pvr_value		= 0x200008D0,
1585 1586 1587
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1588
		.mmu_features		= MMU_FTR_TYPE_44x,
1589 1590
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1591
		.cpu_setup		= __setup_cpu_440grx,
1592
		.machine_check		= machine_check_440A,
1593
		.platform		= "ppc440",
1594
	},
1595 1596 1597 1598 1599 1600
	{ /* 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,
1601
		.mmu_features		= MMU_FTR_TYPE_44x,
1602 1603 1604
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440epx,
1605
		.machine_check		= machine_check_440A,
1606 1607
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1608
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1609 1610 1611
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1612
		.cpu_features		= CPU_FTRS_44X,
1613
		.cpu_user_features	= COMMON_USER_BOOKE,
1614
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1615 1616
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1617
		.machine_check		= machine_check_4xx,
1618
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1619
	},
S
Stephen Rothwell 已提交
1620
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1621 1622 1623
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1624
		.cpu_features		= CPU_FTRS_44X,
1625
		.cpu_user_features	= COMMON_USER_BOOKE,
1626
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1627 1628
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1629
		.machine_check		= machine_check_4xx,
1630
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1631 1632 1633 1634 1635
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1636
		.cpu_features		= CPU_FTRS_44X,
1637
		.cpu_user_features	= COMMON_USER_BOOKE,
1638
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1639 1640
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1641 1642
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1643
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1644 1645 1646 1647 1648
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1649
		.cpu_features		= CPU_FTRS_44X,
1650
		.cpu_user_features	= COMMON_USER_BOOKE,
1651
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1652 1653
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1654 1655
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1656
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1657 1658 1659 1660 1661
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1662
		.cpu_features		= CPU_FTRS_44X,
1663
		.cpu_user_features	= COMMON_USER_BOOKE,
1664
		.mmu_features		= MMU_FTR_TYPE_44x,
L
Linus Torvalds 已提交
1665 1666
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1667 1668
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1669
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1670
	},
1671 1672 1673 1674
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1675
		.cpu_features		= CPU_FTRS_44X,
1676
		.cpu_user_features	= COMMON_USER_BOOKE,
1677
		.mmu_features		= MMU_FTR_TYPE_44x,
1678 1679
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1680 1681
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1682
		.platform		= "ppc440",
1683
	},
1684
	{ /* 440SP Rev. A */
1685 1686
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1687
		.cpu_name		= "440SP Rev. A",
1688
		.cpu_features		= CPU_FTRS_44X,
1689
		.cpu_user_features	= COMMON_USER_BOOKE,
1690
		.mmu_features		= MMU_FTR_TYPE_44x,
1691 1692
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1693
		.machine_check		= machine_check_4xx,
1694
		.platform		= "ppc440",
1695
	},
R
Roland Dreier 已提交
1696
	{ /* 440SPe Rev. A */
1697 1698 1699 1700 1701
		.pvr_mask               = 0xfff00fff,
		.pvr_value              = 0x53400890,
		.cpu_name               = "440SPe Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features      = COMMON_USER_BOOKE,
1702
		.mmu_features		= MMU_FTR_TYPE_44x,
1703 1704
		.icache_bsize           = 32,
		.dcache_bsize           = 32,
1705 1706
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1707 1708 1709 1710 1711 1712
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1713
		.cpu_features		= CPU_FTRS_44X,
1714
		.cpu_user_features	= COMMON_USER_BOOKE,
1715
		.mmu_features		= MMU_FTR_TYPE_44x,
R
Roland Dreier 已提交
1716 1717
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1718 1719
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1720
		.platform		= "ppc440",
R
Roland Dreier 已提交
1721
	},
1722 1723 1724 1725 1726 1727
	{ /* 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,
1728
		.mmu_features		= MMU_FTR_TYPE_44x,
1729 1730
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1731 1732
		.cpu_setup		= __setup_cpu_440x5,
		.machine_check		= machine_check_440A,
1733 1734
		.platform		= "ppc440",
	},
1735
	{ /* 460EX */
1736
		.pvr_mask		= 0xffff0006,
1737 1738
		.pvr_value		= 0x13020002,
		.cpu_name		= "460EX",
1739
		.cpu_features		= CPU_FTRS_440x6,
1740
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1741
		.mmu_features		= MMU_FTR_TYPE_44x,
1742 1743 1744 1745 1746 1747
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760
	{ /* 460EX Rev B */
		.pvr_mask		= 0xffff0007,
		.pvr_value		= 0x13020004,
		.cpu_name		= "460EX Rev. B",
		.cpu_features		= CPU_FTRS_440x6,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1761
	{ /* 460GT */
1762
		.pvr_mask		= 0xffff0006,
1763 1764
		.pvr_value		= 0x13020000,
		.cpu_name		= "460GT",
1765
		.cpu_features		= CPU_FTRS_440x6,
1766
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1767
		.mmu_features		= MMU_FTR_TYPE_44x,
1768 1769
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1770
		.cpu_setup		= __setup_cpu_460gt,
1771 1772 1773
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786
	{ /* 460GT Rev B */
		.pvr_mask		= 0xffff0007,
		.pvr_value		= 0x13020005,
		.cpu_name		= "460GT Rev. B",
		.cpu_features		= CPU_FTRS_440x6,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460gt,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799
	{ /* 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",
	},
1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813
	{ /* 464 in APM821xx */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x12C41C80,
		.cpu_name		= "APM821XX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_44x,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_apm821xx,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1814 1815 1816
	{ /* 476 DD2 core */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x11a52080,
D
Dave Kleikamp 已提交
1817
		.cpu_name		= "476",
1818
		.cpu_features		= CPU_FTRS_47X | CPU_FTR_476_DD2,
D
Dave Kleikamp 已提交
1819 1820 1821 1822
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_47x |
			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836
		.icache_bsize		= 32,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_47x,
		.platform		= "ppc470",
	},
	{ /* 476 iss */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00050000,
		.cpu_name		= "476",
		.cpu_features		= CPU_FTRS_47X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_47x |
			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
D
Dave Kleikamp 已提交
1837 1838
		.icache_bsize		= 32,
		.dcache_bsize		= 128,
1839
		.machine_check		= machine_check_47x,
D
Dave Kleikamp 已提交
1840 1841
		.platform		= "ppc470",
	},
1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855
	{ /* 476 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x11a50000,
		.cpu_name		= "476",
		.cpu_features		= CPU_FTRS_47X,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_FPU,
		.mmu_features		= MMU_FTR_TYPE_47x |
			MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
		.icache_bsize		= 32,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_47x,
		.platform		= "ppc470",
	},
1856 1857 1858 1859 1860 1861
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 44x PPC)",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
1862
		.mmu_features		= MMU_FTR_TYPE_44x,
1863 1864 1865 1866 1867
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	}
L
Linus Torvalds 已提交
1868
#endif /* CONFIG_44x */
1869
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1870
	{	/* e200z5 */
1871 1872 1873 1874
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1875
		.cpu_features		= CPU_FTRS_E200,
1876 1877
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1878
			PPC_FEATURE_UNIFIED_CACHE,
1879
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1880
		.dcache_bsize		= 32,
1881
		.machine_check		= machine_check_e200,
1882
		.platform		= "ppc5554",
1883
	},
S
Stephen Rothwell 已提交
1884
	{	/* e200z6 */
1885 1886 1887 1888
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1889
		.cpu_features		= CPU_FTRS_E200,
1890
		.cpu_user_features	= COMMON_USER_BOOKE |
1891 1892
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1893
			PPC_FEATURE_UNIFIED_CACHE,
1894
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1895
		.dcache_bsize		= 32,
1896
		.machine_check		= machine_check_e200,
1897
		.platform		= "ppc5554",
1898
	},
1899 1900 1901 1902 1903 1904 1905 1906
	{	/* 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,
1907
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
1908
		.dcache_bsize		= 32,
1909
		.cpu_setup		= __setup_cpu_e200,
1910 1911
		.machine_check		= machine_check_e200,
		.platform		= "ppc5554",
1912
	}
1913
#endif /* CONFIG_E200 */
1914
#endif /* CONFIG_PPC32 */
1915
#ifdef CONFIG_E500
1916
#ifdef CONFIG_PPC32
S
Stephen Rothwell 已提交
1917
	{	/* e500 */
L
Linus Torvalds 已提交
1918 1919 1920
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
1921
		.cpu_features		= CPU_FTRS_E500,
1922
		.cpu_user_features	= COMMON_USER_BOOKE |
1923 1924
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1925
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
1926 1927 1928
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1929
		.oprofile_cpu_type	= "ppc/e500",
1930
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1931
		.cpu_setup		= __setup_cpu_e500v1,
1932
		.machine_check		= machine_check_e500,
1933
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1934
	},
S
Stephen Rothwell 已提交
1935
	{	/* e500v2 */
1936 1937 1938
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
1939
		.cpu_features		= CPU_FTRS_E500_2,
1940
		.cpu_user_features	= COMMON_USER_BOOKE |
1941 1942 1943
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1944
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
1945 1946 1947
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1948
		.oprofile_cpu_type	= "ppc/e500",
1949
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1950
		.cpu_setup		= __setup_cpu_e500v2,
1951
		.machine_check		= machine_check_e500,
1952
		.platform		= "ppc8548",
1953
	},
1954 1955 1956 1957 1958 1959
	{	/* 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,
1960
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1961
			MMU_FTR_USE_TLBILX,
1962 1963 1964
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
S
Scott Wood 已提交
1965
		.oprofile_cpu_type	= "ppc/e500mc",
1966
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1967
		.cpu_setup		= __setup_cpu_e500mc,
1968
		.machine_check		= machine_check_e500mc,
1969 1970
		.platform		= "ppce500mc",
	},
1971 1972 1973 1974 1975
#endif /* CONFIG_PPC32 */
	{	/* e5500 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80240000,
		.cpu_name		= "e5500",
1976
		.cpu_features		= CPU_FTRS_E5500,
1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990
		.cpu_user_features	= COMMON_USER_BOOKE,
		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
			MMU_FTR_USE_TLBILX,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500mc",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
		.cpu_setup		= __setup_cpu_e5500,
		.cpu_restore		= __restore_cpu_e5500,
		.machine_check		= machine_check_e500mc,
		.platform		= "ppce5500",
	},
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
1991 1992 1993
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
1994 1995 1996 1997 1998
		.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,
1999
		.mmu_features		= MMU_FTR_TYPE_FSL_E,
L
Linus Torvalds 已提交
2000 2001
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
2002
		.machine_check		= machine_check_e500,
2003
		.platform		= "powerpc",
2004
	}
S
Stephen Rothwell 已提交
2005
#endif /* CONFIG_PPC32 */
2006
#endif /* CONFIG_E500 */
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029

#ifdef CONFIG_PPC_BOOK3E_64
	{	/* This is a default entry to get going, to be replaced by
		 * a real one at some stage
		 */
#define CPU_FTRS_BASE_BOOK3E	(CPU_FTR_USE_TB | \
	    CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
	    CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "Book3E",
		.cpu_features		= CPU_FTRS_BASE_BOOK3E,
		.cpu_user_features	= COMMON_USER_PPC64,
		.mmu_features		= MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
					  MMU_FTR_USE_TLBIVAX_BCAST |
					  MMU_FTR_LOCK_BCAST_INVAL,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 0,
		.machine_check		= machine_check_generic,
		.platform		= "power6",
	},
#endif
L
Linus Torvalds 已提交
2030
};
2031

2032 2033
static struct cpu_spec the_cpu_spec;

2034
static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
2035
{
2036
	struct cpu_spec *t = &the_cpu_spec;
2037 2038
	struct cpu_spec old;

2039
	t = PTRRELOC(t);
2040 2041 2042 2043
	old = *t;

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

2045 2046 2047 2048 2049
	/*
	 * 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.
	 */
2050 2051 2052 2053 2054 2055 2056 2057
	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;

2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070
		/*
		 * 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.
		 */
2071
		if (old.oprofile_cpu_type != NULL) {
2072 2073
			t->oprofile_cpu_type = old.oprofile_cpu_type;
			t->oprofile_type = old.oprofile_type;
2074
		}
2075
	}
2076 2077

	*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2078

2079 2080 2081 2082 2083 2084
	/*
	 * 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;
2085

2086
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2087 2088 2089 2090 2091 2092
	/* 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.
	 */
2093 2094
	if (t->cpu_setup) {
		t->cpu_setup(offset, t);
2095
	}
2096
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108
}

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);
2109 2110
			return s;
		}
2111 2112
	}

2113
	BUG();
2114

2115 2116
	return NULL;
}