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

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

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

#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 已提交
2039
};
2040

2041 2042
static struct cpu_spec the_cpu_spec;

2043
static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
2044
{
2045
	struct cpu_spec *t = &the_cpu_spec;
2046 2047
	struct cpu_spec old;

2048
	t = PTRRELOC(t);
2049 2050 2051 2052
	old = *t;

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

2054 2055 2056 2057 2058
	/*
	 * 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.
	 */
2059 2060 2061 2062 2063 2064 2065 2066
	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;

2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079
		/*
		 * 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.
		 */
2080
		if (old.oprofile_cpu_type != NULL) {
2081 2082
			t->oprofile_cpu_type = old.oprofile_cpu_type;
			t->oprofile_type = old.oprofile_type;
2083
		}
2084
	}
2085 2086

	*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2087

2088 2089 2090 2091 2092 2093
	/*
	 * 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;
2094

2095
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2096 2097 2098 2099 2100 2101 2102 2103 2104
	/* 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);
	}
2105
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117
}

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);
2118 2119
			return s;
		}
2120 2121
	}

2122
	BUG();
2123

2124 2125
	return NULL;
}