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

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

95
static struct cpu_spec __initdata cpu_specs[] = {
96
#ifdef CONFIG_PPC_BOOK3S_64
S
Stephen Rothwell 已提交
97 98 99 100 101
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
102
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
103
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
104 105 106
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
107
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
108
		.oprofile_cpu_type	= "ppc64/power3",
109
		.oprofile_type		= PPC_OPROFILE_RS64,
110
		.machine_check		= machine_check_generic,
111
		.platform		= "power3",
S
Stephen Rothwell 已提交
112 113 114 115 116 117
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
118
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
119
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
120 121 122
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
123
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
124
		.oprofile_cpu_type	= "ppc64/power3",
125
		.oprofile_type		= PPC_OPROFILE_RS64,
126
		.machine_check		= machine_check_generic,
127
		.platform		= "power3",
S
Stephen Rothwell 已提交
128 129 130 131 132 133 134
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
135
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
136 137 138
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
139
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
140
		.oprofile_cpu_type	= "ppc64/rs64",
141
		.oprofile_type		= PPC_OPROFILE_RS64,
142
		.machine_check		= machine_check_generic,
143
		.platform		= "rs64",
S
Stephen Rothwell 已提交
144 145 146 147 148 149 150
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
151
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
152 153 154
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
155
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
156
		.oprofile_cpu_type	= "ppc64/rs64",
157
		.oprofile_type		= PPC_OPROFILE_RS64,
158
		.machine_check		= machine_check_generic,
159
		.platform		= "rs64",
S
Stephen Rothwell 已提交
160 161 162 163 164 165 166
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
167
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
168 169 170
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
171
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
172
		.oprofile_cpu_type	= "ppc64/rs64",
173
		.oprofile_type		= PPC_OPROFILE_RS64,
174
		.machine_check		= machine_check_generic,
175
		.platform		= "rs64",
S
Stephen Rothwell 已提交
176 177 178 179 180 181 182
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
183
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
184 185 186
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
187
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
188
		.oprofile_cpu_type	= "ppc64/rs64",
189
		.oprofile_type		= PPC_OPROFILE_RS64,
190
		.machine_check		= machine_check_generic,
191
		.platform		= "rs64",
S
Stephen Rothwell 已提交
192 193 194 195 196 197
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
198
		.cpu_user_features	= COMMON_USER_POWER4,
199
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
200 201 202
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
203
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
204
		.oprofile_cpu_type	= "ppc64/power4",
205
		.oprofile_type		= PPC_OPROFILE_POWER4,
206
		.machine_check		= machine_check_generic,
207
		.platform		= "power4",
S
Stephen Rothwell 已提交
208 209 210 211 212 213
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
214
		.cpu_user_features	= COMMON_USER_POWER4,
215
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
216 217 218
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
219
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
220
		.oprofile_cpu_type	= "ppc64/power4",
221
		.oprofile_type		= PPC_OPROFILE_POWER4,
222
		.machine_check		= machine_check_generic,
223
		.platform		= "power4",
S
Stephen Rothwell 已提交
224 225 226 227 228 229
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
230
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
231
			PPC_FEATURE_HAS_ALTIVEC_COMP,
232
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
233 234 235
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
236
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
237
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
238
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
239
		.oprofile_cpu_type	= "ppc64/970",
240
		.oprofile_type		= PPC_OPROFILE_POWER4,
241
		.machine_check		= machine_check_generic,
242
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
243 244 245 246 247 248
	},
	{	/* PPC970FX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003c0000,
		.cpu_name		= "PPC970FX",
		.cpu_features		= CPU_FTRS_PPC970,
249
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
250
			PPC_FEATURE_HAS_ALTIVEC_COMP,
251
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
252 253 254
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
255
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
256
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
257
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
258
		.oprofile_cpu_type	= "ppc64/970",
259
		.oprofile_type		= PPC_OPROFILE_POWER4,
260
		.machine_check		= machine_check_generic,
261
		.platform		= "ppc970",
262 263 264 265 266 267 268 269
	},
	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00440100,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
270
		.mmu_features		= MMU_FTR_HPTE_TABLE,
271 272 273
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
274
		.pmc_type		= PPC_PMC_IBM,
275 276 277 278
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
279
		.machine_check		= machine_check_generic,
280
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
281 282 283 284 285 286
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
287
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
288
			PPC_FEATURE_HAS_ALTIVEC_COMP,
289
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
290 291
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
292
		.num_pmcs		= 8,
293
		.pmc_type		= PPC_PMC_IBM,
294
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
295
		.cpu_restore		= __restore_cpu_ppc970,
296
		.oprofile_cpu_type	= "ppc64/970MP",
297
		.oprofile_type		= PPC_OPROFILE_POWER4,
298
		.machine_check		= machine_check_generic,
299
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
300
	},
J
Jake Moilanen 已提交
301 302 303 304 305 306 307
	{	/* PPC970GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00450000,
		.cpu_name		= "PPC970GX",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
308
		.mmu_features		= MMU_FTR_HPTE_TABLE,
J
Jake Moilanen 已提交
309 310 311
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
312
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
313 314 315
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
316
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
317 318
		.platform		= "ppc970",
	},
319
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
320 321 322 323
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
324
		.cpu_user_features	= COMMON_USER_POWER5,
325
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
326 327 328
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
329
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
330
		.oprofile_cpu_type	= "ppc64/power5",
331
		.oprofile_type		= PPC_OPROFILE_POWER4,
332 333 334 335 336
		/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
		 * and above but only works on POWER5 and above
		 */
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
337
		.machine_check		= machine_check_generic,
338
		.platform		= "power5",
S
Stephen Rothwell 已提交
339
	},
340 341 342 343 344 345
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
346
		.mmu_features		= MMU_FTR_HPTE_TABLE,
347 348 349 350 351 352 353
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.oprofile_cpu_type	= "ppc64/power5++",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
354
		.machine_check		= machine_check_generic,
355 356
		.platform		= "power5+",
	},
357
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
358 359
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
360
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
361
		.cpu_features		= CPU_FTRS_POWER5,
362
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
363
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
364 365 366
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
367
		.pmc_type		= PPC_PMC_IBM,
368
		.oprofile_cpu_type	= "ppc64/power5+",
369
		.oprofile_type		= PPC_OPROFILE_POWER4,
370 371
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
372
		.machine_check		= machine_check_generic,
373
		.platform		= "power5+",
S
Stephen Rothwell 已提交
374
	},
375 376 377 378 379 380
	{	/* POWER6 in P5+ mode; 2.04-compliant processor */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000001,
		.cpu_name		= "POWER5+",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
381
		.mmu_features		= MMU_FTR_HPTE_TABLE,
382 383
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
384
		.machine_check		= machine_check_generic,
385 386
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
387 388
		.platform		= "power5+",
	},
389 390 391
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
392 393 394 395
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
396
		.mmu_features		= MMU_FTR_HPTE_TABLE,
397 398 399
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
400
		.pmc_type		= PPC_PMC_IBM,
401 402 403 404 405 406
		.oprofile_cpu_type	= "ppc64/power6",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
407
		.machine_check		= machine_check_generic,
408 409 410 411 412 413
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
414 415
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
416
		.mmu_features		= MMU_FTR_HPTE_TABLE,
417 418
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
419
		.machine_check		= machine_check_generic,
420 421
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
		.oprofile_type		= PPC_OPROFILE_POWER4,
422 423
		.platform		= "power6",
	},
424 425 426 427 428 429
	{	/* 2.06-compliant processor, i.e. Power7 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000003,
		.cpu_name		= "POWER7 (architected)",
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
430 431
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
432 433 434
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_generic,
435 436
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
437 438
		.platform		= "power7",
	},
439 440 441
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
442
		.cpu_name		= "POWER7 (raw)",
443 444
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
445 446
		.mmu_features		= MMU_FTR_HPTE_TABLE |
			MMU_FTR_TLBIE_206,
447 448 449 450 451 452 453 454 455 456 457 458 459 460
		.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",
	},
461
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
462 463 464 465 466
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
467 468
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
469
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
470 471
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
472
		.num_pmcs		= 4,
473
		.pmc_type		= PPC_PMC_IBM,
474 475
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
476
		.machine_check		= machine_check_generic,
477
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
478
	},
479 480 481 482 483 484
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
485
		.mmu_features		= MMU_FTR_HPTE_TABLE,
486 487 488
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
489
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
490 491
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
492 493
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
494
		.machine_check		= machine_check_generic,
495 496
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
497 498 499 500 501 502
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
503
		.mmu_features		= MMU_FTR_HPTE_TABLE,
S
Stephen Rothwell 已提交
504 505 506
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
507
		.pmc_type		= PPC_PMC_IBM,
508
		.machine_check		= machine_check_generic,
509
		.platform		= "power4",
S
Stephen Rothwell 已提交
510
	}
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534
#endif	/* CONFIG_PPC_BOOK3S_64 */
#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

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

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

1851 1852
static struct cpu_spec the_cpu_spec;

1853
static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
1854
{
1855
	struct cpu_spec *t = &the_cpu_spec;
1856 1857
	struct cpu_spec old;

1858
	t = PTRRELOC(t);
1859 1860 1861 1862
	old = *t;

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

1864 1865 1866 1867 1868
	/*
	 * 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.
	 */
1869 1870 1871 1872 1873 1874 1875 1876
	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;

1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889
		/*
		 * 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.
		 */
1890
		if (old.oprofile_cpu_type != NULL) {
1891 1892
			t->oprofile_cpu_type = old.oprofile_cpu_type;
			t->oprofile_type = old.oprofile_type;
1893
		}
1894
	}
1895 1896

	*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1897

1898 1899 1900 1901 1902 1903
	/*
	 * 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;
1904

1905
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1906 1907 1908 1909 1910 1911 1912 1913 1914
	/* ppc64 and booke expect identify_cpu to also call setup_cpu for
	 * that processor. I will consolidate that at a later time, for now,
	 * just use #ifdef. We also don't need to PTRRELOC the function
	 * pointer on ppc64 and booke as we are running at 0 in real mode
	 * on ppc64 and reloc_offset is always 0 on booke.
	 */
	if (s->cpu_setup) {
		s->cpu_setup(offset, s);
	}
1915
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927
}

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);
1928 1929
			return s;
		}
1930 1931
	}

1932
	BUG();
1933

1934 1935
	return NULL;
}