]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/powerpc/kernel/cputable.c
Merge branch 'linus' into core/rcu
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / cputable.c
1 /*
2  *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3  *
4  *  Modifications for ppc64:
5  *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6  *
7  *  This program is free software; you can redistribute it and/or
8  *  modify it under the terms of the GNU General Public License
9  *  as published by the Free Software Foundation; either version
10  *  2 of the License, or (at your option) any later version.
11  */
12
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
18
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h>           /* for PTRRELOC on ARCH=ppc */
22
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
25
26 /* The platform string corresponding to the real PVR */
27 const char *powerpc_base_platform;
28
29 /* NOTE:
30  * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
31  * the responsibility of the appropriate CPU save/restore functions to
32  * eventually copy these settings over. Those save/restore aren't yet
33  * part of the cputable though. That has to be fixed for both ppc32
34  * and ppc64
35  */
36 #ifdef CONFIG_PPC32
37 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
49 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
50 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
53 #endif /* CONFIG_PPC32 */
54 #ifdef CONFIG_PPC64
55 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
56 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
57 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
58 extern void __restore_cpu_pa6t(void);
59 extern void __restore_cpu_ppc970(void);
60 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
61 extern void __restore_cpu_power7(void);
62 #endif /* CONFIG_PPC64 */
63
64 /* This table only contains "desktop" CPUs, it need to be filled with embedded
65  * ones as well...
66  */
67 #define COMMON_USER             (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
68                                  PPC_FEATURE_HAS_MMU)
69 #define COMMON_USER_PPC64       (COMMON_USER | PPC_FEATURE_64)
70 #define COMMON_USER_POWER4      (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
71 #define COMMON_USER_POWER5      (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
72                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
73 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
74                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
75 #define COMMON_USER_POWER6      (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
76                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77                                  PPC_FEATURE_TRUE_LE | \
78                                  PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 #define COMMON_USER_POWER7      (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
80                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
81                                  PPC_FEATURE_TRUE_LE | \
82                                  PPC_FEATURE_PSERIES_PERFMON_COMPAT)
83 #define COMMON_USER_PA6T        (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
84                                  PPC_FEATURE_TRUE_LE | \
85                                  PPC_FEATURE_HAS_ALTIVEC_COMP)
86 #define COMMON_USER_BOOKE       (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
87                                  PPC_FEATURE_BOOKE)
88
89 static struct cpu_spec __initdata cpu_specs[] = {
90 #ifdef CONFIG_PPC64
91         {       /* Power3 */
92                 .pvr_mask               = 0xffff0000,
93                 .pvr_value              = 0x00400000,
94                 .cpu_name               = "POWER3 (630)",
95                 .cpu_features           = CPU_FTRS_POWER3,
96                 .cpu_user_features      = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
97                 .icache_bsize           = 128,
98                 .dcache_bsize           = 128,
99                 .num_pmcs               = 8,
100                 .pmc_type               = PPC_PMC_IBM,
101                 .oprofile_cpu_type      = "ppc64/power3",
102                 .oprofile_type          = PPC_OPROFILE_RS64,
103                 .machine_check          = machine_check_generic,
104                 .platform               = "power3",
105         },
106         {       /* Power3+ */
107                 .pvr_mask               = 0xffff0000,
108                 .pvr_value              = 0x00410000,
109                 .cpu_name               = "POWER3 (630+)",
110                 .cpu_features           = CPU_FTRS_POWER3,
111                 .cpu_user_features      = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
112                 .icache_bsize           = 128,
113                 .dcache_bsize           = 128,
114                 .num_pmcs               = 8,
115                 .pmc_type               = PPC_PMC_IBM,
116                 .oprofile_cpu_type      = "ppc64/power3",
117                 .oprofile_type          = PPC_OPROFILE_RS64,
118                 .machine_check          = machine_check_generic,
119                 .platform               = "power3",
120         },
121         {       /* Northstar */
122                 .pvr_mask               = 0xffff0000,
123                 .pvr_value              = 0x00330000,
124                 .cpu_name               = "RS64-II (northstar)",
125                 .cpu_features           = CPU_FTRS_RS64,
126                 .cpu_user_features      = COMMON_USER_PPC64,
127                 .icache_bsize           = 128,
128                 .dcache_bsize           = 128,
129                 .num_pmcs               = 8,
130                 .pmc_type               = PPC_PMC_IBM,
131                 .oprofile_cpu_type      = "ppc64/rs64",
132                 .oprofile_type          = PPC_OPROFILE_RS64,
133                 .machine_check          = machine_check_generic,
134                 .platform               = "rs64",
135         },
136         {       /* Pulsar */
137                 .pvr_mask               = 0xffff0000,
138                 .pvr_value              = 0x00340000,
139                 .cpu_name               = "RS64-III (pulsar)",
140                 .cpu_features           = CPU_FTRS_RS64,
141                 .cpu_user_features      = COMMON_USER_PPC64,
142                 .icache_bsize           = 128,
143                 .dcache_bsize           = 128,
144                 .num_pmcs               = 8,
145                 .pmc_type               = PPC_PMC_IBM,
146                 .oprofile_cpu_type      = "ppc64/rs64",
147                 .oprofile_type          = PPC_OPROFILE_RS64,
148                 .machine_check          = machine_check_generic,
149                 .platform               = "rs64",
150         },
151         {       /* I-star */
152                 .pvr_mask               = 0xffff0000,
153                 .pvr_value              = 0x00360000,
154                 .cpu_name               = "RS64-III (icestar)",
155                 .cpu_features           = CPU_FTRS_RS64,
156                 .cpu_user_features      = COMMON_USER_PPC64,
157                 .icache_bsize           = 128,
158                 .dcache_bsize           = 128,
159                 .num_pmcs               = 8,
160                 .pmc_type               = PPC_PMC_IBM,
161                 .oprofile_cpu_type      = "ppc64/rs64",
162                 .oprofile_type          = PPC_OPROFILE_RS64,
163                 .machine_check          = machine_check_generic,
164                 .platform               = "rs64",
165         },
166         {       /* S-star */
167                 .pvr_mask               = 0xffff0000,
168                 .pvr_value              = 0x00370000,
169                 .cpu_name               = "RS64-IV (sstar)",
170                 .cpu_features           = CPU_FTRS_RS64,
171                 .cpu_user_features      = COMMON_USER_PPC64,
172                 .icache_bsize           = 128,
173                 .dcache_bsize           = 128,
174                 .num_pmcs               = 8,
175                 .pmc_type               = PPC_PMC_IBM,
176                 .oprofile_cpu_type      = "ppc64/rs64",
177                 .oprofile_type          = PPC_OPROFILE_RS64,
178                 .machine_check          = machine_check_generic,
179                 .platform               = "rs64",
180         },
181         {       /* Power4 */
182                 .pvr_mask               = 0xffff0000,
183                 .pvr_value              = 0x00350000,
184                 .cpu_name               = "POWER4 (gp)",
185                 .cpu_features           = CPU_FTRS_POWER4,
186                 .cpu_user_features      = COMMON_USER_POWER4,
187                 .icache_bsize           = 128,
188                 .dcache_bsize           = 128,
189                 .num_pmcs               = 8,
190                 .pmc_type               = PPC_PMC_IBM,
191                 .oprofile_cpu_type      = "ppc64/power4",
192                 .oprofile_type          = PPC_OPROFILE_POWER4,
193                 .machine_check          = machine_check_generic,
194                 .platform               = "power4",
195         },
196         {       /* Power4+ */
197                 .pvr_mask               = 0xffff0000,
198                 .pvr_value              = 0x00380000,
199                 .cpu_name               = "POWER4+ (gq)",
200                 .cpu_features           = CPU_FTRS_POWER4,
201                 .cpu_user_features      = COMMON_USER_POWER4,
202                 .icache_bsize           = 128,
203                 .dcache_bsize           = 128,
204                 .num_pmcs               = 8,
205                 .pmc_type               = PPC_PMC_IBM,
206                 .oprofile_cpu_type      = "ppc64/power4",
207                 .oprofile_type          = PPC_OPROFILE_POWER4,
208                 .machine_check          = machine_check_generic,
209                 .platform               = "power4",
210         },
211         {       /* PPC970 */
212                 .pvr_mask               = 0xffff0000,
213                 .pvr_value              = 0x00390000,
214                 .cpu_name               = "PPC970",
215                 .cpu_features           = CPU_FTRS_PPC970,
216                 .cpu_user_features      = COMMON_USER_POWER4 |
217                         PPC_FEATURE_HAS_ALTIVEC_COMP,
218                 .icache_bsize           = 128,
219                 .dcache_bsize           = 128,
220                 .num_pmcs               = 8,
221                 .pmc_type               = PPC_PMC_IBM,
222                 .cpu_setup              = __setup_cpu_ppc970,
223                 .cpu_restore            = __restore_cpu_ppc970,
224                 .oprofile_cpu_type      = "ppc64/970",
225                 .oprofile_type          = PPC_OPROFILE_POWER4,
226                 .machine_check          = machine_check_generic,
227                 .platform               = "ppc970",
228         },
229         {       /* PPC970FX */
230                 .pvr_mask               = 0xffff0000,
231                 .pvr_value              = 0x003c0000,
232                 .cpu_name               = "PPC970FX",
233                 .cpu_features           = CPU_FTRS_PPC970,
234                 .cpu_user_features      = COMMON_USER_POWER4 |
235                         PPC_FEATURE_HAS_ALTIVEC_COMP,
236                 .icache_bsize           = 128,
237                 .dcache_bsize           = 128,
238                 .num_pmcs               = 8,
239                 .pmc_type               = PPC_PMC_IBM,
240                 .cpu_setup              = __setup_cpu_ppc970,
241                 .cpu_restore            = __restore_cpu_ppc970,
242                 .oprofile_cpu_type      = "ppc64/970",
243                 .oprofile_type          = PPC_OPROFILE_POWER4,
244                 .machine_check          = machine_check_generic,
245                 .platform               = "ppc970",
246         },
247         {       /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
248                 .pvr_mask               = 0xffffffff,
249                 .pvr_value              = 0x00440100,
250                 .cpu_name               = "PPC970MP",
251                 .cpu_features           = CPU_FTRS_PPC970,
252                 .cpu_user_features      = COMMON_USER_POWER4 |
253                         PPC_FEATURE_HAS_ALTIVEC_COMP,
254                 .icache_bsize           = 128,
255                 .dcache_bsize           = 128,
256                 .num_pmcs               = 8,
257                 .pmc_type               = PPC_PMC_IBM,
258                 .cpu_setup              = __setup_cpu_ppc970,
259                 .cpu_restore            = __restore_cpu_ppc970,
260                 .oprofile_cpu_type      = "ppc64/970MP",
261                 .oprofile_type          = PPC_OPROFILE_POWER4,
262                 .machine_check          = machine_check_generic,
263                 .platform               = "ppc970",
264         },
265         {       /* PPC970MP */
266                 .pvr_mask               = 0xffff0000,
267                 .pvr_value              = 0x00440000,
268                 .cpu_name               = "PPC970MP",
269                 .cpu_features           = CPU_FTRS_PPC970,
270                 .cpu_user_features      = COMMON_USER_POWER4 |
271                         PPC_FEATURE_HAS_ALTIVEC_COMP,
272                 .icache_bsize           = 128,
273                 .dcache_bsize           = 128,
274                 .num_pmcs               = 8,
275                 .pmc_type               = PPC_PMC_IBM,
276                 .cpu_setup              = __setup_cpu_ppc970MP,
277                 .cpu_restore            = __restore_cpu_ppc970,
278                 .oprofile_cpu_type      = "ppc64/970MP",
279                 .oprofile_type          = PPC_OPROFILE_POWER4,
280                 .machine_check          = machine_check_generic,
281                 .platform               = "ppc970",
282         },
283         {       /* PPC970GX */
284                 .pvr_mask               = 0xffff0000,
285                 .pvr_value              = 0x00450000,
286                 .cpu_name               = "PPC970GX",
287                 .cpu_features           = CPU_FTRS_PPC970,
288                 .cpu_user_features      = COMMON_USER_POWER4 |
289                         PPC_FEATURE_HAS_ALTIVEC_COMP,
290                 .icache_bsize           = 128,
291                 .dcache_bsize           = 128,
292                 .num_pmcs               = 8,
293                 .pmc_type               = PPC_PMC_IBM,
294                 .cpu_setup              = __setup_cpu_ppc970,
295                 .oprofile_cpu_type      = "ppc64/970",
296                 .oprofile_type          = PPC_OPROFILE_POWER4,
297                 .machine_check          = machine_check_generic,
298                 .platform               = "ppc970",
299         },
300         {       /* Power5 GR */
301                 .pvr_mask               = 0xffff0000,
302                 .pvr_value              = 0x003a0000,
303                 .cpu_name               = "POWER5 (gr)",
304                 .cpu_features           = CPU_FTRS_POWER5,
305                 .cpu_user_features      = COMMON_USER_POWER5,
306                 .icache_bsize           = 128,
307                 .dcache_bsize           = 128,
308                 .num_pmcs               = 6,
309                 .pmc_type               = PPC_PMC_IBM,
310                 .oprofile_cpu_type      = "ppc64/power5",
311                 .oprofile_type          = PPC_OPROFILE_POWER4,
312                 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
313                  * and above but only works on POWER5 and above
314                  */
315                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
316                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
317                 .machine_check          = machine_check_generic,
318                 .platform               = "power5",
319         },
320         {       /* Power5++ */
321                 .pvr_mask               = 0xffffff00,
322                 .pvr_value              = 0x003b0300,
323                 .cpu_name               = "POWER5+ (gs)",
324                 .cpu_features           = CPU_FTRS_POWER5,
325                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
326                 .icache_bsize           = 128,
327                 .dcache_bsize           = 128,
328                 .num_pmcs               = 6,
329                 .oprofile_cpu_type      = "ppc64/power5++",
330                 .oprofile_type          = PPC_OPROFILE_POWER4,
331                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
332                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
333                 .machine_check          = machine_check_generic,
334                 .platform               = "power5+",
335         },
336         {       /* Power5 GS */
337                 .pvr_mask               = 0xffff0000,
338                 .pvr_value              = 0x003b0000,
339                 .cpu_name               = "POWER5+ (gs)",
340                 .cpu_features           = CPU_FTRS_POWER5,
341                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
342                 .icache_bsize           = 128,
343                 .dcache_bsize           = 128,
344                 .num_pmcs               = 6,
345                 .pmc_type               = PPC_PMC_IBM,
346                 .oprofile_cpu_type      = "ppc64/power5+",
347                 .oprofile_type          = PPC_OPROFILE_POWER4,
348                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
349                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
350                 .machine_check          = machine_check_generic,
351                 .platform               = "power5+",
352         },
353         {       /* POWER6 in P5+ mode; 2.04-compliant processor */
354                 .pvr_mask               = 0xffffffff,
355                 .pvr_value              = 0x0f000001,
356                 .cpu_name               = "POWER5+",
357                 .cpu_features           = CPU_FTRS_POWER5,
358                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
359                 .icache_bsize           = 128,
360                 .dcache_bsize           = 128,
361                 .machine_check          = machine_check_generic,
362                 .oprofile_cpu_type      = "ppc64/compat-power5+",
363                 .platform               = "power5+",
364         },
365         {       /* Power6 */
366                 .pvr_mask               = 0xffff0000,
367                 .pvr_value              = 0x003e0000,
368                 .cpu_name               = "POWER6 (raw)",
369                 .cpu_features           = CPU_FTRS_POWER6,
370                 .cpu_user_features      = COMMON_USER_POWER6 |
371                         PPC_FEATURE_POWER6_EXT,
372                 .icache_bsize           = 128,
373                 .dcache_bsize           = 128,
374                 .num_pmcs               = 6,
375                 .pmc_type               = PPC_PMC_IBM,
376                 .oprofile_cpu_type      = "ppc64/power6",
377                 .oprofile_type          = PPC_OPROFILE_POWER4,
378                 .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
379                 .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
380                 .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
381                         POWER6_MMCRA_OTHER,
382                 .machine_check          = machine_check_generic,
383                 .platform               = "power6x",
384         },
385         {       /* 2.05-compliant processor, i.e. Power6 "architected" mode */
386                 .pvr_mask               = 0xffffffff,
387                 .pvr_value              = 0x0f000002,
388                 .cpu_name               = "POWER6 (architected)",
389                 .cpu_features           = CPU_FTRS_POWER6,
390                 .cpu_user_features      = COMMON_USER_POWER6,
391                 .icache_bsize           = 128,
392                 .dcache_bsize           = 128,
393                 .machine_check          = machine_check_generic,
394                 .oprofile_cpu_type      = "ppc64/compat-power6",
395                 .platform               = "power6",
396         },
397         {       /* 2.06-compliant processor, i.e. Power7 "architected" mode */
398                 .pvr_mask               = 0xffffffff,
399                 .pvr_value              = 0x0f000003,
400                 .cpu_name               = "POWER7 (architected)",
401                 .cpu_features           = CPU_FTRS_POWER7,
402                 .cpu_user_features      = COMMON_USER_POWER7,
403                 .icache_bsize           = 128,
404                 .dcache_bsize           = 128,
405                 .machine_check          = machine_check_generic,
406                 .oprofile_cpu_type      = "ppc64/compat-power7",
407                 .platform               = "power7",
408         },
409         {       /* Power7 */
410                 .pvr_mask               = 0xffff0000,
411                 .pvr_value              = 0x003f0000,
412                 .cpu_name               = "POWER7 (raw)",
413                 .cpu_features           = CPU_FTRS_POWER7,
414                 .cpu_user_features      = COMMON_USER_POWER7,
415                 .icache_bsize           = 128,
416                 .dcache_bsize           = 128,
417                 .num_pmcs               = 6,
418                 .pmc_type               = PPC_PMC_IBM,
419                 .cpu_setup              = __setup_cpu_power7,
420                 .cpu_restore            = __restore_cpu_power7,
421                 .oprofile_cpu_type      = "ppc64/power7",
422                 .oprofile_type          = PPC_OPROFILE_POWER4,
423                 .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
424                 .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
425                 .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
426                         POWER6_MMCRA_OTHER,
427                 .platform               = "power7",
428         },
429         {       /* Cell Broadband Engine */
430                 .pvr_mask               = 0xffff0000,
431                 .pvr_value              = 0x00700000,
432                 .cpu_name               = "Cell Broadband Engine",
433                 .cpu_features           = CPU_FTRS_CELL,
434                 .cpu_user_features      = COMMON_USER_PPC64 |
435                         PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
436                         PPC_FEATURE_SMT,
437                 .icache_bsize           = 128,
438                 .dcache_bsize           = 128,
439                 .num_pmcs               = 4,
440                 .pmc_type               = PPC_PMC_IBM,
441                 .oprofile_cpu_type      = "ppc64/cell-be",
442                 .oprofile_type          = PPC_OPROFILE_CELL,
443                 .machine_check          = machine_check_generic,
444                 .platform               = "ppc-cell-be",
445         },
446         {       /* PA Semi PA6T */
447                 .pvr_mask               = 0x7fff0000,
448                 .pvr_value              = 0x00900000,
449                 .cpu_name               = "PA6T",
450                 .cpu_features           = CPU_FTRS_PA6T,
451                 .cpu_user_features      = COMMON_USER_PA6T,
452                 .icache_bsize           = 64,
453                 .dcache_bsize           = 64,
454                 .num_pmcs               = 6,
455                 .pmc_type               = PPC_PMC_PA6T,
456                 .cpu_setup              = __setup_cpu_pa6t,
457                 .cpu_restore            = __restore_cpu_pa6t,
458                 .oprofile_cpu_type      = "ppc64/pa6t",
459                 .oprofile_type          = PPC_OPROFILE_PA6T,
460                 .machine_check          = machine_check_generic,
461                 .platform               = "pa6t",
462         },
463         {       /* default match */
464                 .pvr_mask               = 0x00000000,
465                 .pvr_value              = 0x00000000,
466                 .cpu_name               = "POWER4 (compatible)",
467                 .cpu_features           = CPU_FTRS_COMPATIBLE,
468                 .cpu_user_features      = COMMON_USER_PPC64,
469                 .icache_bsize           = 128,
470                 .dcache_bsize           = 128,
471                 .num_pmcs               = 6,
472                 .pmc_type               = PPC_PMC_IBM,
473                 .machine_check          = machine_check_generic,
474                 .platform               = "power4",
475         }
476 #endif  /* CONFIG_PPC64 */
477 #ifdef CONFIG_PPC32
478 #if CLASSIC_PPC
479         {       /* 601 */
480                 .pvr_mask               = 0xffff0000,
481                 .pvr_value              = 0x00010000,
482                 .cpu_name               = "601",
483                 .cpu_features           = CPU_FTRS_PPC601,
484                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_601_INSTR |
485                         PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
486                 .icache_bsize           = 32,
487                 .dcache_bsize           = 32,
488                 .machine_check          = machine_check_generic,
489                 .platform               = "ppc601",
490         },
491         {       /* 603 */
492                 .pvr_mask               = 0xffff0000,
493                 .pvr_value              = 0x00030000,
494                 .cpu_name               = "603",
495                 .cpu_features           = CPU_FTRS_603,
496                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
497                 .icache_bsize           = 32,
498                 .dcache_bsize           = 32,
499                 .cpu_setup              = __setup_cpu_603,
500                 .machine_check          = machine_check_generic,
501                 .platform               = "ppc603",
502         },
503         {       /* 603e */
504                 .pvr_mask               = 0xffff0000,
505                 .pvr_value              = 0x00060000,
506                 .cpu_name               = "603e",
507                 .cpu_features           = CPU_FTRS_603,
508                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
509                 .icache_bsize           = 32,
510                 .dcache_bsize           = 32,
511                 .cpu_setup              = __setup_cpu_603,
512                 .machine_check          = machine_check_generic,
513                 .platform               = "ppc603",
514         },
515         {       /* 603ev */
516                 .pvr_mask               = 0xffff0000,
517                 .pvr_value              = 0x00070000,
518                 .cpu_name               = "603ev",
519                 .cpu_features           = CPU_FTRS_603,
520                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
521                 .icache_bsize           = 32,
522                 .dcache_bsize           = 32,
523                 .cpu_setup              = __setup_cpu_603,
524                 .machine_check          = machine_check_generic,
525                 .platform               = "ppc603",
526         },
527         {       /* 604 */
528                 .pvr_mask               = 0xffff0000,
529                 .pvr_value              = 0x00040000,
530                 .cpu_name               = "604",
531                 .cpu_features           = CPU_FTRS_604,
532                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
533                 .icache_bsize           = 32,
534                 .dcache_bsize           = 32,
535                 .num_pmcs               = 2,
536                 .cpu_setup              = __setup_cpu_604,
537                 .machine_check          = machine_check_generic,
538                 .platform               = "ppc604",
539         },
540         {       /* 604e */
541                 .pvr_mask               = 0xfffff000,
542                 .pvr_value              = 0x00090000,
543                 .cpu_name               = "604e",
544                 .cpu_features           = CPU_FTRS_604,
545                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
546                 .icache_bsize           = 32,
547                 .dcache_bsize           = 32,
548                 .num_pmcs               = 4,
549                 .cpu_setup              = __setup_cpu_604,
550                 .machine_check          = machine_check_generic,
551                 .platform               = "ppc604",
552         },
553         {       /* 604r */
554                 .pvr_mask               = 0xffff0000,
555                 .pvr_value              = 0x00090000,
556                 .cpu_name               = "604r",
557                 .cpu_features           = CPU_FTRS_604,
558                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
559                 .icache_bsize           = 32,
560                 .dcache_bsize           = 32,
561                 .num_pmcs               = 4,
562                 .cpu_setup              = __setup_cpu_604,
563                 .machine_check          = machine_check_generic,
564                 .platform               = "ppc604",
565         },
566         {       /* 604ev */
567                 .pvr_mask               = 0xffff0000,
568                 .pvr_value              = 0x000a0000,
569                 .cpu_name               = "604ev",
570                 .cpu_features           = CPU_FTRS_604,
571                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
572                 .icache_bsize           = 32,
573                 .dcache_bsize           = 32,
574                 .num_pmcs               = 4,
575                 .cpu_setup              = __setup_cpu_604,
576                 .machine_check          = machine_check_generic,
577                 .platform               = "ppc604",
578         },
579         {       /* 740/750 (0x4202, don't support TAU ?) */
580                 .pvr_mask               = 0xffffffff,
581                 .pvr_value              = 0x00084202,
582                 .cpu_name               = "740/750",
583                 .cpu_features           = CPU_FTRS_740_NOTAU,
584                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
585                 .icache_bsize           = 32,
586                 .dcache_bsize           = 32,
587                 .num_pmcs               = 4,
588                 .cpu_setup              = __setup_cpu_750,
589                 .machine_check          = machine_check_generic,
590                 .platform               = "ppc750",
591         },
592         {       /* 750CX (80100 and 8010x?) */
593                 .pvr_mask               = 0xfffffff0,
594                 .pvr_value              = 0x00080100,
595                 .cpu_name               = "750CX",
596                 .cpu_features           = CPU_FTRS_750,
597                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
598                 .icache_bsize           = 32,
599                 .dcache_bsize           = 32,
600                 .num_pmcs               = 4,
601                 .cpu_setup              = __setup_cpu_750cx,
602                 .machine_check          = machine_check_generic,
603                 .platform               = "ppc750",
604         },
605         {       /* 750CX (82201 and 82202) */
606                 .pvr_mask               = 0xfffffff0,
607                 .pvr_value              = 0x00082200,
608                 .cpu_name               = "750CX",
609                 .cpu_features           = CPU_FTRS_750,
610                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
611                 .icache_bsize           = 32,
612                 .dcache_bsize           = 32,
613                 .num_pmcs               = 4,
614                 .pmc_type               = PPC_PMC_IBM,
615                 .cpu_setup              = __setup_cpu_750cx,
616                 .machine_check          = machine_check_generic,
617                 .platform               = "ppc750",
618         },
619         {       /* 750CXe (82214) */
620                 .pvr_mask               = 0xfffffff0,
621                 .pvr_value              = 0x00082210,
622                 .cpu_name               = "750CXe",
623                 .cpu_features           = CPU_FTRS_750,
624                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
625                 .icache_bsize           = 32,
626                 .dcache_bsize           = 32,
627                 .num_pmcs               = 4,
628                 .pmc_type               = PPC_PMC_IBM,
629                 .cpu_setup              = __setup_cpu_750cx,
630                 .machine_check          = machine_check_generic,
631                 .platform               = "ppc750",
632         },
633         {       /* 750CXe "Gekko" (83214) */
634                 .pvr_mask               = 0xffffffff,
635                 .pvr_value              = 0x00083214,
636                 .cpu_name               = "750CXe",
637                 .cpu_features           = CPU_FTRS_750,
638                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
639                 .icache_bsize           = 32,
640                 .dcache_bsize           = 32,
641                 .num_pmcs               = 4,
642                 .pmc_type               = PPC_PMC_IBM,
643                 .cpu_setup              = __setup_cpu_750cx,
644                 .machine_check          = machine_check_generic,
645                 .platform               = "ppc750",
646         },
647         {       /* 750CL */
648                 .pvr_mask               = 0xfffff0f0,
649                 .pvr_value              = 0x00087010,
650                 .cpu_name               = "750CL",
651                 .cpu_features           = CPU_FTRS_750CL,
652                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
653                 .icache_bsize           = 32,
654                 .dcache_bsize           = 32,
655                 .num_pmcs               = 4,
656                 .pmc_type               = PPC_PMC_IBM,
657                 .cpu_setup              = __setup_cpu_750,
658                 .machine_check          = machine_check_generic,
659                 .platform               = "ppc750",
660         },
661         {       /* 745/755 */
662                 .pvr_mask               = 0xfffff000,
663                 .pvr_value              = 0x00083000,
664                 .cpu_name               = "745/755",
665                 .cpu_features           = CPU_FTRS_750,
666                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
667                 .icache_bsize           = 32,
668                 .dcache_bsize           = 32,
669                 .num_pmcs               = 4,
670                 .pmc_type               = PPC_PMC_IBM,
671                 .cpu_setup              = __setup_cpu_750,
672                 .machine_check          = machine_check_generic,
673                 .platform               = "ppc750",
674         },
675         {       /* 750FX rev 1.x */
676                 .pvr_mask               = 0xffffff00,
677                 .pvr_value              = 0x70000100,
678                 .cpu_name               = "750FX",
679                 .cpu_features           = CPU_FTRS_750FX1,
680                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
681                 .icache_bsize           = 32,
682                 .dcache_bsize           = 32,
683                 .num_pmcs               = 4,
684                 .pmc_type               = PPC_PMC_IBM,
685                 .cpu_setup              = __setup_cpu_750,
686                 .machine_check          = machine_check_generic,
687                 .platform               = "ppc750",
688         },
689         {       /* 750FX rev 2.0 must disable HID0[DPM] */
690                 .pvr_mask               = 0xffffffff,
691                 .pvr_value              = 0x70000200,
692                 .cpu_name               = "750FX",
693                 .cpu_features           = CPU_FTRS_750FX2,
694                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
695                 .icache_bsize           = 32,
696                 .dcache_bsize           = 32,
697                 .num_pmcs               = 4,
698                 .pmc_type               = PPC_PMC_IBM,
699                 .cpu_setup              = __setup_cpu_750,
700                 .machine_check          = machine_check_generic,
701                 .platform               = "ppc750",
702         },
703         {       /* 750FX (All revs except 2.0) */
704                 .pvr_mask               = 0xffff0000,
705                 .pvr_value              = 0x70000000,
706                 .cpu_name               = "750FX",
707                 .cpu_features           = CPU_FTRS_750FX,
708                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
709                 .icache_bsize           = 32,
710                 .dcache_bsize           = 32,
711                 .num_pmcs               = 4,
712                 .pmc_type               = PPC_PMC_IBM,
713                 .cpu_setup              = __setup_cpu_750fx,
714                 .machine_check          = machine_check_generic,
715                 .platform               = "ppc750",
716         },
717         {       /* 750GX */
718                 .pvr_mask               = 0xffff0000,
719                 .pvr_value              = 0x70020000,
720                 .cpu_name               = "750GX",
721                 .cpu_features           = CPU_FTRS_750GX,
722                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
723                 .icache_bsize           = 32,
724                 .dcache_bsize           = 32,
725                 .num_pmcs               = 4,
726                 .pmc_type               = PPC_PMC_IBM,
727                 .cpu_setup              = __setup_cpu_750fx,
728                 .machine_check          = machine_check_generic,
729                 .platform               = "ppc750",
730         },
731         {       /* 740/750 (L2CR bit need fixup for 740) */
732                 .pvr_mask               = 0xffff0000,
733                 .pvr_value              = 0x00080000,
734                 .cpu_name               = "740/750",
735                 .cpu_features           = CPU_FTRS_740,
736                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
737                 .icache_bsize           = 32,
738                 .dcache_bsize           = 32,
739                 .num_pmcs               = 4,
740                 .pmc_type               = PPC_PMC_IBM,
741                 .cpu_setup              = __setup_cpu_750,
742                 .machine_check          = machine_check_generic,
743                 .platform               = "ppc750",
744         },
745         {       /* 7400 rev 1.1 ? (no TAU) */
746                 .pvr_mask               = 0xffffffff,
747                 .pvr_value              = 0x000c1101,
748                 .cpu_name               = "7400 (1.1)",
749                 .cpu_features           = CPU_FTRS_7400_NOTAU,
750                 .cpu_user_features      = COMMON_USER |
751                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
752                 .icache_bsize           = 32,
753                 .dcache_bsize           = 32,
754                 .num_pmcs               = 4,
755                 .pmc_type               = PPC_PMC_G4,
756                 .cpu_setup              = __setup_cpu_7400,
757                 .machine_check          = machine_check_generic,
758                 .platform               = "ppc7400",
759         },
760         {       /* 7400 */
761                 .pvr_mask               = 0xffff0000,
762                 .pvr_value              = 0x000c0000,
763                 .cpu_name               = "7400",
764                 .cpu_features           = CPU_FTRS_7400,
765                 .cpu_user_features      = COMMON_USER |
766                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
767                 .icache_bsize           = 32,
768                 .dcache_bsize           = 32,
769                 .num_pmcs               = 4,
770                 .pmc_type               = PPC_PMC_G4,
771                 .cpu_setup              = __setup_cpu_7400,
772                 .machine_check          = machine_check_generic,
773                 .platform               = "ppc7400",
774         },
775         {       /* 7410 */
776                 .pvr_mask               = 0xffff0000,
777                 .pvr_value              = 0x800c0000,
778                 .cpu_name               = "7410",
779                 .cpu_features           = CPU_FTRS_7400,
780                 .cpu_user_features      = COMMON_USER |
781                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
782                 .icache_bsize           = 32,
783                 .dcache_bsize           = 32,
784                 .num_pmcs               = 4,
785                 .pmc_type               = PPC_PMC_G4,
786                 .cpu_setup              = __setup_cpu_7410,
787                 .machine_check          = machine_check_generic,
788                 .platform               = "ppc7400",
789         },
790         {       /* 7450 2.0 - no doze/nap */
791                 .pvr_mask               = 0xffffffff,
792                 .pvr_value              = 0x80000200,
793                 .cpu_name               = "7450",
794                 .cpu_features           = CPU_FTRS_7450_20,
795                 .cpu_user_features      = COMMON_USER |
796                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
797                 .icache_bsize           = 32,
798                 .dcache_bsize           = 32,
799                 .num_pmcs               = 6,
800                 .pmc_type               = PPC_PMC_G4,
801                 .cpu_setup              = __setup_cpu_745x,
802                 .oprofile_cpu_type      = "ppc/7450",
803                 .oprofile_type          = PPC_OPROFILE_G4,
804                 .machine_check          = machine_check_generic,
805                 .platform               = "ppc7450",
806         },
807         {       /* 7450 2.1 */
808                 .pvr_mask               = 0xffffffff,
809                 .pvr_value              = 0x80000201,
810                 .cpu_name               = "7450",
811                 .cpu_features           = CPU_FTRS_7450_21,
812                 .cpu_user_features      = COMMON_USER |
813                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
814                 .icache_bsize           = 32,
815                 .dcache_bsize           = 32,
816                 .num_pmcs               = 6,
817                 .pmc_type               = PPC_PMC_G4,
818                 .cpu_setup              = __setup_cpu_745x,
819                 .oprofile_cpu_type      = "ppc/7450",
820                 .oprofile_type          = PPC_OPROFILE_G4,
821                 .machine_check          = machine_check_generic,
822                 .platform               = "ppc7450",
823         },
824         {       /* 7450 2.3 and newer */
825                 .pvr_mask               = 0xffff0000,
826                 .pvr_value              = 0x80000000,
827                 .cpu_name               = "7450",
828                 .cpu_features           = CPU_FTRS_7450_23,
829                 .cpu_user_features      = COMMON_USER |
830                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
831                 .icache_bsize           = 32,
832                 .dcache_bsize           = 32,
833                 .num_pmcs               = 6,
834                 .pmc_type               = PPC_PMC_G4,
835                 .cpu_setup              = __setup_cpu_745x,
836                 .oprofile_cpu_type      = "ppc/7450",
837                 .oprofile_type          = PPC_OPROFILE_G4,
838                 .machine_check          = machine_check_generic,
839                 .platform               = "ppc7450",
840         },
841         {       /* 7455 rev 1.x */
842                 .pvr_mask               = 0xffffff00,
843                 .pvr_value              = 0x80010100,
844                 .cpu_name               = "7455",
845                 .cpu_features           = CPU_FTRS_7455_1,
846                 .cpu_user_features      = COMMON_USER |
847                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
848                 .icache_bsize           = 32,
849                 .dcache_bsize           = 32,
850                 .num_pmcs               = 6,
851                 .pmc_type               = PPC_PMC_G4,
852                 .cpu_setup              = __setup_cpu_745x,
853                 .oprofile_cpu_type      = "ppc/7450",
854                 .oprofile_type          = PPC_OPROFILE_G4,
855                 .machine_check          = machine_check_generic,
856                 .platform               = "ppc7450",
857         },
858         {       /* 7455 rev 2.0 */
859                 .pvr_mask               = 0xffffffff,
860                 .pvr_value              = 0x80010200,
861                 .cpu_name               = "7455",
862                 .cpu_features           = CPU_FTRS_7455_20,
863                 .cpu_user_features      = COMMON_USER |
864                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
865                 .icache_bsize           = 32,
866                 .dcache_bsize           = 32,
867                 .num_pmcs               = 6,
868                 .pmc_type               = PPC_PMC_G4,
869                 .cpu_setup              = __setup_cpu_745x,
870                 .oprofile_cpu_type      = "ppc/7450",
871                 .oprofile_type          = PPC_OPROFILE_G4,
872                 .machine_check          = machine_check_generic,
873                 .platform               = "ppc7450",
874         },
875         {       /* 7455 others */
876                 .pvr_mask               = 0xffff0000,
877                 .pvr_value              = 0x80010000,
878                 .cpu_name               = "7455",
879                 .cpu_features           = CPU_FTRS_7455,
880                 .cpu_user_features      = COMMON_USER |
881                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
882                 .icache_bsize           = 32,
883                 .dcache_bsize           = 32,
884                 .num_pmcs               = 6,
885                 .pmc_type               = PPC_PMC_G4,
886                 .cpu_setup              = __setup_cpu_745x,
887                 .oprofile_cpu_type      = "ppc/7450",
888                 .oprofile_type          = PPC_OPROFILE_G4,
889                 .machine_check          = machine_check_generic,
890                 .platform               = "ppc7450",
891         },
892         {       /* 7447/7457 Rev 1.0 */
893                 .pvr_mask               = 0xffffffff,
894                 .pvr_value              = 0x80020100,
895                 .cpu_name               = "7447/7457",
896                 .cpu_features           = CPU_FTRS_7447_10,
897                 .cpu_user_features      = COMMON_USER |
898                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
899                 .icache_bsize           = 32,
900                 .dcache_bsize           = 32,
901                 .num_pmcs               = 6,
902                 .pmc_type               = PPC_PMC_G4,
903                 .cpu_setup              = __setup_cpu_745x,
904                 .oprofile_cpu_type      = "ppc/7450",
905                 .oprofile_type          = PPC_OPROFILE_G4,
906                 .machine_check          = machine_check_generic,
907                 .platform               = "ppc7450",
908         },
909         {       /* 7447/7457 Rev 1.1 */
910                 .pvr_mask               = 0xffffffff,
911                 .pvr_value              = 0x80020101,
912                 .cpu_name               = "7447/7457",
913                 .cpu_features           = CPU_FTRS_7447_10,
914                 .cpu_user_features      = COMMON_USER |
915                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
916                 .icache_bsize           = 32,
917                 .dcache_bsize           = 32,
918                 .num_pmcs               = 6,
919                 .pmc_type               = PPC_PMC_G4,
920                 .cpu_setup              = __setup_cpu_745x,
921                 .oprofile_cpu_type      = "ppc/7450",
922                 .oprofile_type          = PPC_OPROFILE_G4,
923                 .machine_check          = machine_check_generic,
924                 .platform               = "ppc7450",
925         },
926         {       /* 7447/7457 Rev 1.2 and later */
927                 .pvr_mask               = 0xffff0000,
928                 .pvr_value              = 0x80020000,
929                 .cpu_name               = "7447/7457",
930                 .cpu_features           = CPU_FTRS_7447,
931                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
932                 .icache_bsize           = 32,
933                 .dcache_bsize           = 32,
934                 .num_pmcs               = 6,
935                 .pmc_type               = PPC_PMC_G4,
936                 .cpu_setup              = __setup_cpu_745x,
937                 .oprofile_cpu_type      = "ppc/7450",
938                 .oprofile_type          = PPC_OPROFILE_G4,
939                 .machine_check          = machine_check_generic,
940                 .platform               = "ppc7450",
941         },
942         {       /* 7447A */
943                 .pvr_mask               = 0xffff0000,
944                 .pvr_value              = 0x80030000,
945                 .cpu_name               = "7447A",
946                 .cpu_features           = CPU_FTRS_7447A,
947                 .cpu_user_features      = COMMON_USER |
948                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
949                 .icache_bsize           = 32,
950                 .dcache_bsize           = 32,
951                 .num_pmcs               = 6,
952                 .pmc_type               = PPC_PMC_G4,
953                 .cpu_setup              = __setup_cpu_745x,
954                 .oprofile_cpu_type      = "ppc/7450",
955                 .oprofile_type          = PPC_OPROFILE_G4,
956                 .machine_check          = machine_check_generic,
957                 .platform               = "ppc7450",
958         },
959         {       /* 7448 */
960                 .pvr_mask               = 0xffff0000,
961                 .pvr_value              = 0x80040000,
962                 .cpu_name               = "7448",
963                 .cpu_features           = CPU_FTRS_7448,
964                 .cpu_user_features      = COMMON_USER |
965                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
966                 .icache_bsize           = 32,
967                 .dcache_bsize           = 32,
968                 .num_pmcs               = 6,
969                 .pmc_type               = PPC_PMC_G4,
970                 .cpu_setup              = __setup_cpu_745x,
971                 .oprofile_cpu_type      = "ppc/7450",
972                 .oprofile_type          = PPC_OPROFILE_G4,
973                 .machine_check          = machine_check_generic,
974                 .platform               = "ppc7450",
975         },
976         {       /* 82xx (8240, 8245, 8260 are all 603e cores) */
977                 .pvr_mask               = 0x7fff0000,
978                 .pvr_value              = 0x00810000,
979                 .cpu_name               = "82xx",
980                 .cpu_features           = CPU_FTRS_82XX,
981                 .cpu_user_features      = COMMON_USER,
982                 .icache_bsize           = 32,
983                 .dcache_bsize           = 32,
984                 .cpu_setup              = __setup_cpu_603,
985                 .machine_check          = machine_check_generic,
986                 .platform               = "ppc603",
987         },
988         {       /* All G2_LE (603e core, plus some) have the same pvr */
989                 .pvr_mask               = 0x7fff0000,
990                 .pvr_value              = 0x00820000,
991                 .cpu_name               = "G2_LE",
992                 .cpu_features           = CPU_FTRS_G2_LE,
993                 .cpu_user_features      = COMMON_USER,
994                 .icache_bsize           = 32,
995                 .dcache_bsize           = 32,
996                 .cpu_setup              = __setup_cpu_603,
997                 .machine_check          = machine_check_generic,
998                 .platform               = "ppc603",
999         },
1000         {       /* e300c1 (a 603e core, plus some) on 83xx */
1001                 .pvr_mask               = 0x7fff0000,
1002                 .pvr_value              = 0x00830000,
1003                 .cpu_name               = "e300c1",
1004                 .cpu_features           = CPU_FTRS_E300,
1005                 .cpu_user_features      = COMMON_USER,
1006                 .icache_bsize           = 32,
1007                 .dcache_bsize           = 32,
1008                 .cpu_setup              = __setup_cpu_603,
1009                 .machine_check          = machine_check_generic,
1010                 .platform               = "ppc603",
1011         },
1012         {       /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1013                 .pvr_mask               = 0x7fff0000,
1014                 .pvr_value              = 0x00840000,
1015                 .cpu_name               = "e300c2",
1016                 .cpu_features           = CPU_FTRS_E300C2,
1017                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1018                 .icache_bsize           = 32,
1019                 .dcache_bsize           = 32,
1020                 .cpu_setup              = __setup_cpu_603,
1021                 .machine_check          = machine_check_generic,
1022                 .platform               = "ppc603",
1023         },
1024         {       /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
1025                 .pvr_mask               = 0x7fff0000,
1026                 .pvr_value              = 0x00850000,
1027                 .cpu_name               = "e300c3",
1028                 .cpu_features           = CPU_FTRS_E300,
1029                 .cpu_user_features      = COMMON_USER,
1030                 .icache_bsize           = 32,
1031                 .dcache_bsize           = 32,
1032                 .cpu_setup              = __setup_cpu_603,
1033                 .num_pmcs               = 4,
1034                 .oprofile_cpu_type      = "ppc/e300",
1035                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1036                 .platform               = "ppc603",
1037         },
1038         {       /* e300c4 (e300c1, plus one IU) */
1039                 .pvr_mask               = 0x7fff0000,
1040                 .pvr_value              = 0x00860000,
1041                 .cpu_name               = "e300c4",
1042                 .cpu_features           = CPU_FTRS_E300,
1043                 .cpu_user_features      = COMMON_USER,
1044                 .icache_bsize           = 32,
1045                 .dcache_bsize           = 32,
1046                 .cpu_setup              = __setup_cpu_603,
1047                 .machine_check          = machine_check_generic,
1048                 .num_pmcs               = 4,
1049                 .oprofile_cpu_type      = "ppc/e300",
1050                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1051                 .platform               = "ppc603",
1052         },
1053         {       /* default match, we assume split I/D cache & TB (non-601)... */
1054                 .pvr_mask               = 0x00000000,
1055                 .pvr_value              = 0x00000000,
1056                 .cpu_name               = "(generic PPC)",
1057                 .cpu_features           = CPU_FTRS_CLASSIC32,
1058                 .cpu_user_features      = COMMON_USER,
1059                 .icache_bsize           = 32,
1060                 .dcache_bsize           = 32,
1061                 .machine_check          = machine_check_generic,
1062                 .platform               = "ppc603",
1063         },
1064 #endif /* CLASSIC_PPC */
1065 #ifdef CONFIG_8xx
1066         {       /* 8xx */
1067                 .pvr_mask               = 0xffff0000,
1068                 .pvr_value              = 0x00500000,
1069                 .cpu_name               = "8xx",
1070                 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1071                  * if the 8xx code is there.... */
1072                 .cpu_features           = CPU_FTRS_8XX,
1073                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1074                 .icache_bsize           = 16,
1075                 .dcache_bsize           = 16,
1076                 .platform               = "ppc823",
1077         },
1078 #endif /* CONFIG_8xx */
1079 #ifdef CONFIG_40x
1080         {       /* 403GC */
1081                 .pvr_mask               = 0xffffff00,
1082                 .pvr_value              = 0x00200200,
1083                 .cpu_name               = "403GC",
1084                 .cpu_features           = CPU_FTRS_40X,
1085                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1086                 .icache_bsize           = 16,
1087                 .dcache_bsize           = 16,
1088                 .machine_check          = machine_check_4xx,
1089                 .platform               = "ppc403",
1090         },
1091         {       /* 403GCX */
1092                 .pvr_mask               = 0xffffff00,
1093                 .pvr_value              = 0x00201400,
1094                 .cpu_name               = "403GCX",
1095                 .cpu_features           = CPU_FTRS_40X,
1096                 .cpu_user_features      = PPC_FEATURE_32 |
1097                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1098                 .icache_bsize           = 16,
1099                 .dcache_bsize           = 16,
1100                 .machine_check          = machine_check_4xx,
1101                 .platform               = "ppc403",
1102         },
1103         {       /* 403G ?? */
1104                 .pvr_mask               = 0xffff0000,
1105                 .pvr_value              = 0x00200000,
1106                 .cpu_name               = "403G ??",
1107                 .cpu_features           = CPU_FTRS_40X,
1108                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1109                 .icache_bsize           = 16,
1110                 .dcache_bsize           = 16,
1111                 .machine_check          = machine_check_4xx,
1112                 .platform               = "ppc403",
1113         },
1114         {       /* 405GP */
1115                 .pvr_mask               = 0xffff0000,
1116                 .pvr_value              = 0x40110000,
1117                 .cpu_name               = "405GP",
1118                 .cpu_features           = CPU_FTRS_40X,
1119                 .cpu_user_features      = PPC_FEATURE_32 |
1120                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1121                 .icache_bsize           = 32,
1122                 .dcache_bsize           = 32,
1123                 .machine_check          = machine_check_4xx,
1124                 .platform               = "ppc405",
1125         },
1126         {       /* STB 03xxx */
1127                 .pvr_mask               = 0xffff0000,
1128                 .pvr_value              = 0x40130000,
1129                 .cpu_name               = "STB03xxx",
1130                 .cpu_features           = CPU_FTRS_40X,
1131                 .cpu_user_features      = PPC_FEATURE_32 |
1132                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1133                 .icache_bsize           = 32,
1134                 .dcache_bsize           = 32,
1135                 .machine_check          = machine_check_4xx,
1136                 .platform               = "ppc405",
1137         },
1138         {       /* STB 04xxx */
1139                 .pvr_mask               = 0xffff0000,
1140                 .pvr_value              = 0x41810000,
1141                 .cpu_name               = "STB04xxx",
1142                 .cpu_features           = CPU_FTRS_40X,
1143                 .cpu_user_features      = PPC_FEATURE_32 |
1144                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1145                 .icache_bsize           = 32,
1146                 .dcache_bsize           = 32,
1147                 .machine_check          = machine_check_4xx,
1148                 .platform               = "ppc405",
1149         },
1150         {       /* NP405L */
1151                 .pvr_mask               = 0xffff0000,
1152                 .pvr_value              = 0x41610000,
1153                 .cpu_name               = "NP405L",
1154                 .cpu_features           = CPU_FTRS_40X,
1155                 .cpu_user_features      = PPC_FEATURE_32 |
1156                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1157                 .icache_bsize           = 32,
1158                 .dcache_bsize           = 32,
1159                 .machine_check          = machine_check_4xx,
1160                 .platform               = "ppc405",
1161         },
1162         {       /* NP4GS3 */
1163                 .pvr_mask               = 0xffff0000,
1164                 .pvr_value              = 0x40B10000,
1165                 .cpu_name               = "NP4GS3",
1166                 .cpu_features           = CPU_FTRS_40X,
1167                 .cpu_user_features      = PPC_FEATURE_32 |
1168                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1169                 .icache_bsize           = 32,
1170                 .dcache_bsize           = 32,
1171                 .machine_check          = machine_check_4xx,
1172                 .platform               = "ppc405",
1173         },
1174         {   /* NP405H */
1175                 .pvr_mask               = 0xffff0000,
1176                 .pvr_value              = 0x41410000,
1177                 .cpu_name               = "NP405H",
1178                 .cpu_features           = CPU_FTRS_40X,
1179                 .cpu_user_features      = PPC_FEATURE_32 |
1180                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1181                 .icache_bsize           = 32,
1182                 .dcache_bsize           = 32,
1183                 .machine_check          = machine_check_4xx,
1184                 .platform               = "ppc405",
1185         },
1186         {       /* 405GPr */
1187                 .pvr_mask               = 0xffff0000,
1188                 .pvr_value              = 0x50910000,
1189                 .cpu_name               = "405GPr",
1190                 .cpu_features           = CPU_FTRS_40X,
1191                 .cpu_user_features      = PPC_FEATURE_32 |
1192                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1193                 .icache_bsize           = 32,
1194                 .dcache_bsize           = 32,
1195                 .machine_check          = machine_check_4xx,
1196                 .platform               = "ppc405",
1197         },
1198         {   /* STBx25xx */
1199                 .pvr_mask               = 0xffff0000,
1200                 .pvr_value              = 0x51510000,
1201                 .cpu_name               = "STBx25xx",
1202                 .cpu_features           = CPU_FTRS_40X,
1203                 .cpu_user_features      = PPC_FEATURE_32 |
1204                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1205                 .icache_bsize           = 32,
1206                 .dcache_bsize           = 32,
1207                 .machine_check          = machine_check_4xx,
1208                 .platform               = "ppc405",
1209         },
1210         {       /* 405LP */
1211                 .pvr_mask               = 0xffff0000,
1212                 .pvr_value              = 0x41F10000,
1213                 .cpu_name               = "405LP",
1214                 .cpu_features           = CPU_FTRS_40X,
1215                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1216                 .icache_bsize           = 32,
1217                 .dcache_bsize           = 32,
1218                 .machine_check          = machine_check_4xx,
1219                 .platform               = "ppc405",
1220         },
1221         {       /* Xilinx Virtex-II Pro  */
1222                 .pvr_mask               = 0xfffff000,
1223                 .pvr_value              = 0x20010000,
1224                 .cpu_name               = "Virtex-II Pro",
1225                 .cpu_features           = CPU_FTRS_40X,
1226                 .cpu_user_features      = PPC_FEATURE_32 |
1227                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1228                 .icache_bsize           = 32,
1229                 .dcache_bsize           = 32,
1230                 .machine_check          = machine_check_4xx,
1231                 .platform               = "ppc405",
1232         },
1233         {       /* Xilinx Virtex-4 FX */
1234                 .pvr_mask               = 0xfffff000,
1235                 .pvr_value              = 0x20011000,
1236                 .cpu_name               = "Virtex-4 FX",
1237                 .cpu_features           = CPU_FTRS_40X,
1238                 .cpu_user_features      = PPC_FEATURE_32 |
1239                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1240                 .icache_bsize           = 32,
1241                 .dcache_bsize           = 32,
1242                 .machine_check          = machine_check_4xx,
1243                 .platform               = "ppc405",
1244         },
1245         {       /* 405EP */
1246                 .pvr_mask               = 0xffff0000,
1247                 .pvr_value              = 0x51210000,
1248                 .cpu_name               = "405EP",
1249                 .cpu_features           = CPU_FTRS_40X,
1250                 .cpu_user_features      = PPC_FEATURE_32 |
1251                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1252                 .icache_bsize           = 32,
1253                 .dcache_bsize           = 32,
1254                 .machine_check          = machine_check_4xx,
1255                 .platform               = "ppc405",
1256         },
1257         {       /* 405EX */
1258                 .pvr_mask               = 0xffff0004,
1259                 .pvr_value              = 0x12910004,
1260                 .cpu_name               = "405EX",
1261                 .cpu_features           = CPU_FTRS_40X,
1262                 .cpu_user_features      = PPC_FEATURE_32 |
1263                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1264                 .icache_bsize           = 32,
1265                 .dcache_bsize           = 32,
1266                 .machine_check          = machine_check_4xx,
1267                 .platform               = "ppc405",
1268         },
1269         {       /* 405EXr */
1270                 .pvr_mask               = 0xffff0004,
1271                 .pvr_value              = 0x12910000,
1272                 .cpu_name               = "405EXr",
1273                 .cpu_features           = CPU_FTRS_40X,
1274                 .cpu_user_features      = PPC_FEATURE_32 |
1275                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1276                 .icache_bsize           = 32,
1277                 .dcache_bsize           = 32,
1278                 .machine_check          = machine_check_4xx,
1279                 .platform               = "ppc405",
1280         },
1281         {
1282                 /* 405EZ */
1283                 .pvr_mask               = 0xffff0000,
1284                 .pvr_value              = 0x41510000,
1285                 .cpu_name               = "405EZ",
1286                 .cpu_features           = CPU_FTRS_40X,
1287                 .cpu_user_features      = PPC_FEATURE_32 |
1288                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1289                 .icache_bsize           = 32,
1290                 .dcache_bsize           = 32,
1291                 .machine_check          = machine_check_4xx,
1292                 .platform               = "ppc405",
1293         },
1294         {       /* default match */
1295                 .pvr_mask               = 0x00000000,
1296                 .pvr_value              = 0x00000000,
1297                 .cpu_name               = "(generic 40x PPC)",
1298                 .cpu_features           = CPU_FTRS_40X,
1299                 .cpu_user_features      = PPC_FEATURE_32 |
1300                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1301                 .icache_bsize           = 32,
1302                 .dcache_bsize           = 32,
1303                 .machine_check          = machine_check_4xx,
1304                 .platform               = "ppc405",
1305         }
1306
1307 #endif /* CONFIG_40x */
1308 #ifdef CONFIG_44x
1309         {
1310                 .pvr_mask               = 0xf0000fff,
1311                 .pvr_value              = 0x40000850,
1312                 .cpu_name               = "440GR Rev. A",
1313                 .cpu_features           = CPU_FTRS_44X,
1314                 .cpu_user_features      = COMMON_USER_BOOKE,
1315                 .icache_bsize           = 32,
1316                 .dcache_bsize           = 32,
1317                 .machine_check          = machine_check_4xx,
1318                 .platform               = "ppc440",
1319         },
1320         { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1321                 .pvr_mask               = 0xf0000fff,
1322                 .pvr_value              = 0x40000858,
1323                 .cpu_name               = "440EP Rev. A",
1324                 .cpu_features           = CPU_FTRS_44X,
1325                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1326                 .icache_bsize           = 32,
1327                 .dcache_bsize           = 32,
1328                 .cpu_setup              = __setup_cpu_440ep,
1329                 .machine_check          = machine_check_4xx,
1330                 .platform               = "ppc440",
1331         },
1332         {
1333                 .pvr_mask               = 0xf0000fff,
1334                 .pvr_value              = 0x400008d3,
1335                 .cpu_name               = "440GR Rev. B",
1336                 .cpu_features           = CPU_FTRS_44X,
1337                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1338                 .icache_bsize           = 32,
1339                 .dcache_bsize           = 32,
1340                 .machine_check          = machine_check_4xx,
1341                 .platform               = "ppc440",
1342         },
1343         { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1344                 .pvr_mask               = 0xf0000ff7,
1345                 .pvr_value              = 0x400008d4,
1346                 .cpu_name               = "440EP Rev. C",
1347                 .cpu_features           = CPU_FTRS_44X,
1348                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1349                 .icache_bsize           = 32,
1350                 .dcache_bsize           = 32,
1351                 .cpu_setup              = __setup_cpu_440ep,
1352                 .machine_check          = machine_check_4xx,
1353                 .platform               = "ppc440",
1354         },
1355         { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1356                 .pvr_mask               = 0xf0000fff,
1357                 .pvr_value              = 0x400008db,
1358                 .cpu_name               = "440EP Rev. B",
1359                 .cpu_features           = CPU_FTRS_44X,
1360                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1361                 .icache_bsize           = 32,
1362                 .dcache_bsize           = 32,
1363                 .cpu_setup              = __setup_cpu_440ep,
1364                 .machine_check          = machine_check_4xx,
1365                 .platform               = "ppc440",
1366         },
1367         { /* 440GRX */
1368                 .pvr_mask               = 0xf0000ffb,
1369                 .pvr_value              = 0x200008D0,
1370                 .cpu_name               = "440GRX",
1371                 .cpu_features           = CPU_FTRS_44X,
1372                 .cpu_user_features      = COMMON_USER_BOOKE,
1373                 .icache_bsize           = 32,
1374                 .dcache_bsize           = 32,
1375                 .cpu_setup              = __setup_cpu_440grx,
1376                 .machine_check          = machine_check_440A,
1377                 .platform               = "ppc440",
1378         },
1379         { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1380                 .pvr_mask               = 0xf0000ffb,
1381                 .pvr_value              = 0x200008D8,
1382                 .cpu_name               = "440EPX",
1383                 .cpu_features           = CPU_FTRS_44X,
1384                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1385                 .icache_bsize           = 32,
1386                 .dcache_bsize           = 32,
1387                 .cpu_setup              = __setup_cpu_440epx,
1388                 .machine_check          = machine_check_440A,
1389                 .platform               = "ppc440",
1390         },
1391         {       /* 440GP Rev. B */
1392                 .pvr_mask               = 0xf0000fff,
1393                 .pvr_value              = 0x40000440,
1394                 .cpu_name               = "440GP Rev. B",
1395                 .cpu_features           = CPU_FTRS_44X,
1396                 .cpu_user_features      = COMMON_USER_BOOKE,
1397                 .icache_bsize           = 32,
1398                 .dcache_bsize           = 32,
1399                 .machine_check          = machine_check_4xx,
1400                 .platform               = "ppc440gp",
1401         },
1402         {       /* 440GP Rev. C */
1403                 .pvr_mask               = 0xf0000fff,
1404                 .pvr_value              = 0x40000481,
1405                 .cpu_name               = "440GP Rev. C",
1406                 .cpu_features           = CPU_FTRS_44X,
1407                 .cpu_user_features      = COMMON_USER_BOOKE,
1408                 .icache_bsize           = 32,
1409                 .dcache_bsize           = 32,
1410                 .machine_check          = machine_check_4xx,
1411                 .platform               = "ppc440gp",
1412         },
1413         { /* 440GX Rev. A */
1414                 .pvr_mask               = 0xf0000fff,
1415                 .pvr_value              = 0x50000850,
1416                 .cpu_name               = "440GX Rev. A",
1417                 .cpu_features           = CPU_FTRS_44X,
1418                 .cpu_user_features      = COMMON_USER_BOOKE,
1419                 .icache_bsize           = 32,
1420                 .dcache_bsize           = 32,
1421                 .cpu_setup              = __setup_cpu_440gx,
1422                 .machine_check          = machine_check_440A,
1423                 .platform               = "ppc440",
1424         },
1425         { /* 440GX Rev. B */
1426                 .pvr_mask               = 0xf0000fff,
1427                 .pvr_value              = 0x50000851,
1428                 .cpu_name               = "440GX Rev. B",
1429                 .cpu_features           = CPU_FTRS_44X,
1430                 .cpu_user_features      = COMMON_USER_BOOKE,
1431                 .icache_bsize           = 32,
1432                 .dcache_bsize           = 32,
1433                 .cpu_setup              = __setup_cpu_440gx,
1434                 .machine_check          = machine_check_440A,
1435                 .platform               = "ppc440",
1436         },
1437         { /* 440GX Rev. C */
1438                 .pvr_mask               = 0xf0000fff,
1439                 .pvr_value              = 0x50000892,
1440                 .cpu_name               = "440GX Rev. C",
1441                 .cpu_features           = CPU_FTRS_44X,
1442                 .cpu_user_features      = COMMON_USER_BOOKE,
1443                 .icache_bsize           = 32,
1444                 .dcache_bsize           = 32,
1445                 .cpu_setup              = __setup_cpu_440gx,
1446                 .machine_check          = machine_check_440A,
1447                 .platform               = "ppc440",
1448         },
1449         { /* 440GX Rev. F */
1450                 .pvr_mask               = 0xf0000fff,
1451                 .pvr_value              = 0x50000894,
1452                 .cpu_name               = "440GX Rev. F",
1453                 .cpu_features           = CPU_FTRS_44X,
1454                 .cpu_user_features      = COMMON_USER_BOOKE,
1455                 .icache_bsize           = 32,
1456                 .dcache_bsize           = 32,
1457                 .cpu_setup              = __setup_cpu_440gx,
1458                 .machine_check          = machine_check_440A,
1459                 .platform               = "ppc440",
1460         },
1461         { /* 440SP Rev. A */
1462                 .pvr_mask               = 0xfff00fff,
1463                 .pvr_value              = 0x53200891,
1464                 .cpu_name               = "440SP Rev. A",
1465                 .cpu_features           = CPU_FTRS_44X,
1466                 .cpu_user_features      = COMMON_USER_BOOKE,
1467                 .icache_bsize           = 32,
1468                 .dcache_bsize           = 32,
1469                 .machine_check          = machine_check_4xx,
1470                 .platform               = "ppc440",
1471         },
1472         { /* 440SPe Rev. A */
1473                 .pvr_mask               = 0xfff00fff,
1474                 .pvr_value              = 0x53400890,
1475                 .cpu_name               = "440SPe Rev. A",
1476                 .cpu_features           = CPU_FTRS_44X,
1477                 .cpu_user_features      = COMMON_USER_BOOKE,
1478                 .icache_bsize           = 32,
1479                 .dcache_bsize           = 32,
1480                 .cpu_setup              = __setup_cpu_440spe,
1481                 .machine_check          = machine_check_440A,
1482                 .platform               = "ppc440",
1483         },
1484         { /* 440SPe Rev. B */
1485                 .pvr_mask               = 0xfff00fff,
1486                 .pvr_value              = 0x53400891,
1487                 .cpu_name               = "440SPe Rev. B",
1488                 .cpu_features           = CPU_FTRS_44X,
1489                 .cpu_user_features      = COMMON_USER_BOOKE,
1490                 .icache_bsize           = 32,
1491                 .dcache_bsize           = 32,
1492                 .cpu_setup              = __setup_cpu_440spe,
1493                 .machine_check          = machine_check_440A,
1494                 .platform               = "ppc440",
1495         },
1496         { /* 440 in Xilinx Virtex-5 FXT */
1497                 .pvr_mask               = 0xfffffff0,
1498                 .pvr_value              = 0x7ff21910,
1499                 .cpu_name               = "440 in Virtex-5 FXT",
1500                 .cpu_features           = CPU_FTRS_44X,
1501                 .cpu_user_features      = COMMON_USER_BOOKE,
1502                 .icache_bsize           = 32,
1503                 .dcache_bsize           = 32,
1504                 .cpu_setup              = __setup_cpu_440x5,
1505                 .machine_check          = machine_check_440A,
1506                 .platform               = "ppc440",
1507         },
1508         { /* 460EX */
1509                 .pvr_mask               = 0xffff0002,
1510                 .pvr_value              = 0x13020002,
1511                 .cpu_name               = "460EX",
1512                 .cpu_features           = CPU_FTRS_44X,
1513                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1514                 .icache_bsize           = 32,
1515                 .dcache_bsize           = 32,
1516                 .cpu_setup              = __setup_cpu_460ex,
1517                 .machine_check          = machine_check_440A,
1518                 .platform               = "ppc440",
1519         },
1520         { /* 460GT */
1521                 .pvr_mask               = 0xffff0002,
1522                 .pvr_value              = 0x13020000,
1523                 .cpu_name               = "460GT",
1524                 .cpu_features           = CPU_FTRS_44X,
1525                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1526                 .icache_bsize           = 32,
1527                 .dcache_bsize           = 32,
1528                 .cpu_setup              = __setup_cpu_460gt,
1529                 .machine_check          = machine_check_440A,
1530                 .platform               = "ppc440",
1531         },
1532         {       /* default match */
1533                 .pvr_mask               = 0x00000000,
1534                 .pvr_value              = 0x00000000,
1535                 .cpu_name               = "(generic 44x PPC)",
1536                 .cpu_features           = CPU_FTRS_44X,
1537                 .cpu_user_features      = COMMON_USER_BOOKE,
1538                 .icache_bsize           = 32,
1539                 .dcache_bsize           = 32,
1540                 .machine_check          = machine_check_4xx,
1541                 .platform               = "ppc440",
1542         }
1543 #endif /* CONFIG_44x */
1544 #ifdef CONFIG_E200
1545         {       /* e200z5 */
1546                 .pvr_mask               = 0xfff00000,
1547                 .pvr_value              = 0x81000000,
1548                 .cpu_name               = "e200z5",
1549                 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1550                 .cpu_features           = CPU_FTRS_E200,
1551                 .cpu_user_features      = COMMON_USER_BOOKE |
1552                         PPC_FEATURE_HAS_EFP_SINGLE |
1553                         PPC_FEATURE_UNIFIED_CACHE,
1554                 .dcache_bsize           = 32,
1555                 .machine_check          = machine_check_e200,
1556                 .platform               = "ppc5554",
1557         },
1558         {       /* e200z6 */
1559                 .pvr_mask               = 0xfff00000,
1560                 .pvr_value              = 0x81100000,
1561                 .cpu_name               = "e200z6",
1562                 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1563                 .cpu_features           = CPU_FTRS_E200,
1564                 .cpu_user_features      = COMMON_USER_BOOKE |
1565                         PPC_FEATURE_HAS_SPE_COMP |
1566                         PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1567                         PPC_FEATURE_UNIFIED_CACHE,
1568                 .dcache_bsize           = 32,
1569                 .machine_check          = machine_check_e200,
1570                 .platform               = "ppc5554",
1571         },
1572         {       /* default match */
1573                 .pvr_mask               = 0x00000000,
1574                 .pvr_value              = 0x00000000,
1575                 .cpu_name               = "(generic E200 PPC)",
1576                 .cpu_features           = CPU_FTRS_E200,
1577                 .cpu_user_features      = COMMON_USER_BOOKE |
1578                         PPC_FEATURE_HAS_EFP_SINGLE |
1579                         PPC_FEATURE_UNIFIED_CACHE,
1580                 .dcache_bsize           = 32,
1581                 .machine_check          = machine_check_e200,
1582                 .platform               = "ppc5554",
1583         }
1584 #endif /* CONFIG_E200 */
1585 #ifdef CONFIG_E500
1586         {       /* e500 */
1587                 .pvr_mask               = 0xffff0000,
1588                 .pvr_value              = 0x80200000,
1589                 .cpu_name               = "e500",
1590                 .cpu_features           = CPU_FTRS_E500,
1591                 .cpu_user_features      = COMMON_USER_BOOKE |
1592                         PPC_FEATURE_HAS_SPE_COMP |
1593                         PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1594                 .icache_bsize           = 32,
1595                 .dcache_bsize           = 32,
1596                 .num_pmcs               = 4,
1597                 .oprofile_cpu_type      = "ppc/e500",
1598                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1599                 .machine_check          = machine_check_e500,
1600                 .platform               = "ppc8540",
1601         },
1602         {       /* e500v2 */
1603                 .pvr_mask               = 0xffff0000,
1604                 .pvr_value              = 0x80210000,
1605                 .cpu_name               = "e500v2",
1606                 .cpu_features           = CPU_FTRS_E500_2,
1607                 .cpu_user_features      = COMMON_USER_BOOKE |
1608                         PPC_FEATURE_HAS_SPE_COMP |
1609                         PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1610                         PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1611                 .icache_bsize           = 32,
1612                 .dcache_bsize           = 32,
1613                 .num_pmcs               = 4,
1614                 .oprofile_cpu_type      = "ppc/e500",
1615                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1616                 .machine_check          = machine_check_e500,
1617                 .platform               = "ppc8548",
1618         },
1619         {       /* e500mc */
1620                 .pvr_mask               = 0xffff0000,
1621                 .pvr_value              = 0x80230000,
1622                 .cpu_name               = "e500mc",
1623                 .cpu_features           = CPU_FTRS_E500MC,
1624                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1625                 .icache_bsize           = 64,
1626                 .dcache_bsize           = 64,
1627                 .num_pmcs               = 4,
1628                 .oprofile_cpu_type      = "ppc/e500", /* xxx - galak, e500mc? */
1629                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1630                 .machine_check          = machine_check_e500,
1631                 .platform               = "ppce500mc",
1632         },
1633         {       /* default match */
1634                 .pvr_mask               = 0x00000000,
1635                 .pvr_value              = 0x00000000,
1636                 .cpu_name               = "(generic E500 PPC)",
1637                 .cpu_features           = CPU_FTRS_E500,
1638                 .cpu_user_features      = COMMON_USER_BOOKE |
1639                         PPC_FEATURE_HAS_SPE_COMP |
1640                         PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1641                 .icache_bsize           = 32,
1642                 .dcache_bsize           = 32,
1643                 .machine_check          = machine_check_e500,
1644                 .platform               = "powerpc",
1645         }
1646 #endif /* CONFIG_E500 */
1647 #endif /* CONFIG_PPC32 */
1648 };
1649
1650 static struct cpu_spec the_cpu_spec;
1651
1652 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1653 {
1654         struct cpu_spec *s = cpu_specs;
1655         struct cpu_spec *t = &the_cpu_spec;
1656         int i;
1657
1658         s = PTRRELOC(s);
1659         t = PTRRELOC(t);
1660
1661         for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1662                 if ((pvr & s->pvr_mask) == s->pvr_value) {
1663                         /*
1664                          * If we are overriding a previous value derived
1665                          * from the real PVR with a new value obtained
1666                          * using a logical PVR value, don't modify the
1667                          * performance monitor fields.
1668                          */
1669                         if (t->num_pmcs && !s->num_pmcs) {
1670                                 t->cpu_name = s->cpu_name;
1671                                 t->cpu_features = s->cpu_features;
1672                                 t->cpu_user_features = s->cpu_user_features;
1673                                 t->icache_bsize = s->icache_bsize;
1674                                 t->dcache_bsize = s->dcache_bsize;
1675                                 t->cpu_setup = s->cpu_setup;
1676                                 t->cpu_restore = s->cpu_restore;
1677                                 t->platform = s->platform;
1678                                 /*
1679                                  * If we have passed through this logic once
1680                                  * before and have pulled the default case
1681                                  * because the real PVR was not found inside
1682                                  * cpu_specs[], then we are possibly running in
1683                                  * compatibility mode. In that case, let the
1684                                  * oprofiler know which set of compatibility
1685                                  * counters to pull from by making sure the
1686                                  * oprofile_cpu_type string is set to that of
1687                                  * compatibility mode. If the oprofile_cpu_type
1688                                  * already has a value, then we are possibly
1689                                  * overriding a real PVR with a logical one, and,
1690                                  * in that case, keep the current value for
1691                                  * oprofile_cpu_type.
1692                                  */
1693                                 if (t->oprofile_cpu_type == NULL)
1694                                         t->oprofile_cpu_type = s->oprofile_cpu_type;
1695                         } else
1696                                 *t = *s;
1697                         *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1698
1699                         /*
1700                          * Set the base platform string once; assumes
1701                          * we're called with real pvr first.
1702                          */
1703                         if (*PTRRELOC(&powerpc_base_platform) == NULL)
1704                                 *PTRRELOC(&powerpc_base_platform) = t->platform;
1705
1706 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1707                         /* ppc64 and booke expect identify_cpu to also call
1708                          * setup_cpu for that processor. I will consolidate
1709                          * that at a later time, for now, just use #ifdef.
1710                          * we also don't need to PTRRELOC the function pointer
1711                          * on ppc64 and booke as we are running at 0 in real
1712                          * mode on ppc64 and reloc_offset is always 0 on booke.
1713                          */
1714                         if (s->cpu_setup) {
1715                                 s->cpu_setup(offset, s);
1716                         }
1717 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1718                         return s;
1719                 }
1720         BUG();
1721         return NULL;
1722 }