blob: edae5bb06f1f3906847b0207955f9d560bc57aae [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * 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
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -040017#include <linux/export.h>
Kumar Gala400d2212005-09-27 15:13:12 -050018
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +000022#include <asm/mmu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Kumar Gala400d2212005-09-27 15:13:12 -050024struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100025EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Nathan Lynch9115d132008-07-16 09:58:51 +100027/* The platform string corresponding to the real PVR */
28const char *powerpc_base_platform;
29
Stephen Rothwell49209602005-10-12 15:55:09 +100030/* NOTE:
31 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
32 * the responsibility of the appropriate CPU save/restore functions to
33 * eventually copy these settings over. Those save/restore aren't yet
34 * part of the cputable though. That has to be fixed for both ppc32
35 * and ppc64
36 */
Geoff Levandb26f1002006-05-19 14:24:18 +100037#ifdef CONFIG_PPC32
Kumar Gala105c31d2009-01-08 08:31:20 -060038extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak81127532007-09-22 00:46:57 +100042extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110044extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100045extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110046extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Grant Likely640d17d2008-12-04 05:39:55 +000047extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
Stefan Roese464076a2008-02-24 08:07:41 +110048extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
Josh Boyer939e6222008-06-11 07:52:40 -040049extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
Madhulika Madishetty6c712092009-02-05 13:31:36 +000050extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
Tirumala Marri6edc3232010-09-13 13:26:11 +000051extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
Kumar Gala400d2212005-09-27 15:13:12 -050052extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
53extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100060#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050061#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050062extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050063extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060064extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000065extern void __setup_cpu_a2(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110066extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050067extern void __restore_cpu_ppc970(void);
Michael Neulinge952e6c2008-06-18 10:47:26 +100068extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
69extern void __restore_cpu_power7(void);
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +000070extern void __restore_cpu_a2(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050071#endif /* CONFIG_PPC64 */
Kumar Gala4490c062010-10-08 08:32:11 -050072#if defined(CONFIG_E500)
73extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
74extern void __restore_cpu_e5500(void);
75#endif /* CONFIG_E500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Linus Torvalds1da177e2005-04-16 15:20:36 -070077/* This table only contains "desktop" CPUs, it need to be filled with embedded
78 * ones as well...
79 */
Stephen Rothwell49209602005-10-12 15:55:09 +100080#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
81 PPC_FEATURE_HAS_MMU)
82#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110083#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +110084#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
85 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
86#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
87 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100088#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100089 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100090 PPC_FEATURE_TRUE_LE | \
91 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Michael Neulinge952e6c2008-06-18 10:47:26 +100092#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
93 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
Nathan Lynch0f473312008-07-10 01:06:57 +100094 PPC_FEATURE_TRUE_LE | \
95 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050096#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
97 PPC_FEATURE_TRUE_LE | \
98 PPC_FEATURE_HAS_ALTIVEC_COMP)
Kumar Galaf45c4482009-08-18 19:08:30 +000099#ifdef CONFIG_PPC_BOOK3E_64
100#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
101#else
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100102#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
103 PPC_FEATURE_BOOKE)
Kumar Galaf45c4482009-08-18 19:08:30 +0000104#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105
Paul Mackerras87a72f92007-10-04 14:18:01 +1000106static struct cpu_spec __initdata cpu_specs[] = {
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000107#ifdef CONFIG_PPC_BOOK3S_64
Stephen Rothwell49209602005-10-12 15:55:09 +1000108 { /* Power3 */
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00400000,
111 .cpu_name = "POWER3 (630)",
112 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000113 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000114 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000115 .icache_bsize = 128,
116 .dcache_bsize = 128,
117 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600118 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000119 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000120 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100121 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 },
123 { /* Power3+ */
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00410000,
126 .cpu_name = "POWER3 (630+)",
127 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000128 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000129 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000130 .icache_bsize = 128,
131 .dcache_bsize = 128,
132 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600133 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000134 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000135 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100136 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 },
138 { /* Northstar */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00330000,
141 .cpu_name = "RS64-II (northstar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000144 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000145 .icache_bsize = 128,
146 .dcache_bsize = 128,
147 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600148 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000149 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000150 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100151 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 },
153 { /* Pulsar */
154 .pvr_mask = 0xffff0000,
155 .pvr_value = 0x00340000,
156 .cpu_name = "RS64-III (pulsar)",
157 .cpu_features = CPU_FTRS_RS64,
158 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000159 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000160 .icache_bsize = 128,
161 .dcache_bsize = 128,
162 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600163 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000164 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000165 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100166 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 },
168 { /* I-star */
169 .pvr_mask = 0xffff0000,
170 .pvr_value = 0x00360000,
171 .cpu_name = "RS64-III (icestar)",
172 .cpu_features = CPU_FTRS_RS64,
173 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000174 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000175 .icache_bsize = 128,
176 .dcache_bsize = 128,
177 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600178 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000180 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100181 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 },
183 { /* S-star */
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x00370000,
186 .cpu_name = "RS64-IV (sstar)",
187 .cpu_features = CPU_FTRS_RS64,
188 .cpu_user_features = COMMON_USER_PPC64,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000189 .mmu_features = MMU_FTR_HPTE_TABLE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 .icache_bsize = 128,
191 .dcache_bsize = 128,
192 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600193 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000194 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000195 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100196 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 },
198 { /* Power4 */
199 .pvr_mask = 0xffff0000,
200 .pvr_value = 0x00350000,
201 .cpu_name = "POWER4 (gp)",
202 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100203 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000204 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 .icache_bsize = 128,
206 .dcache_bsize = 128,
207 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600208 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000210 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100211 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000212 },
213 { /* Power4+ */
214 .pvr_mask = 0xffff0000,
215 .pvr_value = 0x00380000,
216 .cpu_name = "POWER4+ (gq)",
217 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100218 .cpu_user_features = COMMON_USER_POWER4,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000219 .mmu_features = MMU_FTRS_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .icache_bsize = 128,
221 .dcache_bsize = 128,
222 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600223 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000225 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100226 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 },
228 { /* PPC970 */
229 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x00390000,
231 .cpu_name = "PPC970",
232 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100233 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000234 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000235 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000236 .icache_bsize = 128,
237 .dcache_bsize = 128,
238 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600239 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000240 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500241 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000242 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000243 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100244 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000245 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000246 { /* PPC970FX */
247 .pvr_mask = 0xffff0000,
248 .pvr_value = 0x003c0000,
249 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100251 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000253 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000254 .icache_bsize = 128,
255 .dcache_bsize = 128,
256 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600257 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500259 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000260 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000261 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100262 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000263 },
Olof Johansson3546e812007-02-26 00:35:14 -0600264 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
265 .pvr_mask = 0xffffffff,
266 .pvr_value = 0x00440100,
267 .cpu_name = "PPC970MP",
268 .cpu_features = CPU_FTRS_PPC970,
269 .cpu_user_features = COMMON_USER_POWER4 |
270 PPC_FEATURE_HAS_ALTIVEC_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000271 .mmu_features = MMU_FTR_HPTE_TABLE,
Olof Johansson3546e812007-02-26 00:35:14 -0600272 .icache_bsize = 128,
273 .dcache_bsize = 128,
274 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000275 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600276 .cpu_setup = __setup_cpu_ppc970,
277 .cpu_restore = __restore_cpu_ppc970,
278 .oprofile_cpu_type = "ppc64/970MP",
279 .oprofile_type = PPC_OPROFILE_POWER4,
280 .platform = "ppc970",
281 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 { /* PPC970MP */
283 .pvr_mask = 0xffff0000,
284 .pvr_value = 0x00440000,
285 .cpu_name = "PPC970MP",
286 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100287 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000289 .mmu_features = MMU_FTRS_PPC970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000290 .icache_bsize = 128,
291 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000292 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000293 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500294 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500295 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600296 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000297 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100298 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000299 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500300 { /* PPC970GX */
301 .pvr_mask = 0xffff0000,
302 .pvr_value = 0x00450000,
303 .cpu_name = "PPC970GX",
304 .cpu_features = CPU_FTRS_PPC970,
305 .cpu_user_features = COMMON_USER_POWER4 |
306 PPC_FEATURE_HAS_ALTIVEC_COMP,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000307 .mmu_features = MMU_FTRS_PPC970,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500308 .icache_bsize = 128,
309 .dcache_bsize = 128,
310 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600311 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500312 .cpu_setup = __setup_cpu_ppc970,
313 .oprofile_cpu_type = "ppc64/970",
314 .oprofile_type = PPC_OPROFILE_POWER4,
315 .platform = "ppc970",
316 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100317 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000318 .pvr_mask = 0xffff0000,
319 .pvr_value = 0x003a0000,
320 .cpu_name = "POWER5 (gr)",
321 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100322 .cpu_user_features = COMMON_USER_POWER5,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000323 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000324 .icache_bsize = 128,
325 .dcache_bsize = 128,
326 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600327 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000328 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000329 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000330 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
331 * and above but only works on POWER5 and above
332 */
333 .oprofile_mmcra_sihv = MMCRA_SIHV,
334 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100335 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000336 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500337 { /* Power5++ */
338 .pvr_mask = 0xffffff00,
339 .pvr_value = 0x003b0300,
340 .cpu_name = "POWER5+ (gs)",
341 .cpu_features = CPU_FTRS_POWER5,
342 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000343 .mmu_features = MMU_FTRS_POWER5,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500344 .icache_bsize = 128,
345 .dcache_bsize = 128,
346 .num_pmcs = 6,
347 .oprofile_cpu_type = "ppc64/power5++",
348 .oprofile_type = PPC_OPROFILE_POWER4,
349 .oprofile_mmcra_sihv = MMCRA_SIHV,
350 .oprofile_mmcra_sipr = MMCRA_SIPR,
351 .platform = "power5+",
352 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100353 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000354 .pvr_mask = 0xffff0000,
355 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100356 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000357 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100358 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000359 .mmu_features = MMU_FTRS_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000360 .icache_bsize = 128,
361 .dcache_bsize = 128,
362 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600363 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100364 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000365 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000366 .oprofile_mmcra_sihv = MMCRA_SIHV,
367 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100368 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000369 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100370 { /* POWER6 in P5+ mode; 2.04-compliant processor */
371 .pvr_mask = 0xffffffff,
372 .pvr_value = 0x0f000001,
373 .cpu_name = "POWER5+",
374 .cpu_features = CPU_FTRS_POWER5,
375 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000376 .mmu_features = MMU_FTRS_POWER5,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100377 .icache_bsize = 128,
378 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000379 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
380 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100381 .platform = "power5+",
382 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000383 { /* Power6 */
384 .pvr_mask = 0xffff0000,
385 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100386 .cpu_name = "POWER6 (raw)",
387 .cpu_features = CPU_FTRS_POWER6,
388 .cpu_user_features = COMMON_USER_POWER6 |
389 PPC_FEATURE_POWER6_EXT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000390 .mmu_features = MMU_FTRS_POWER6,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100391 .icache_bsize = 128,
392 .dcache_bsize = 128,
393 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000394 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100395 .oprofile_cpu_type = "ppc64/power6",
396 .oprofile_type = PPC_OPROFILE_POWER4,
397 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
398 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
399 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
400 POWER6_MMCRA_OTHER,
401 .platform = "power6x",
402 },
403 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
404 .pvr_mask = 0xffffffff,
405 .pvr_value = 0x0f000002,
406 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000407 .cpu_features = CPU_FTRS_POWER6,
408 .cpu_user_features = COMMON_USER_POWER6,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000409 .mmu_features = MMU_FTRS_POWER6,
Anton Blanchard03054d52006-04-29 09:51:06 +1000410 .icache_bsize = 128,
411 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000412 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
413 .oprofile_type = PPC_OPROFILE_POWER4,
Anton Blanchard03054d52006-04-29 09:51:06 +1000414 .platform = "power6",
415 },
Joel Schopp635f5a62008-06-19 06:18:21 +1000416 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
417 .pvr_mask = 0xffffffff,
418 .pvr_value = 0x0f000003,
419 .cpu_name = "POWER7 (architected)",
420 .cpu_features = CPU_FTRS_POWER7,
421 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000422 .mmu_features = MMU_FTRS_POWER7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000423 .icache_bsize = 128,
424 .dcache_bsize = 128,
Michael Wolf79af6c42009-04-27 06:17:54 +0000425 .oprofile_type = PPC_OPROFILE_POWER4,
426 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100427 .cpu_setup = __setup_cpu_power7,
428 .cpu_restore = __restore_cpu_power7,
Joel Schopp635f5a62008-06-19 06:18:21 +1000429 .platform = "power7",
430 },
Michael Neulinge952e6c2008-06-18 10:47:26 +1000431 { /* Power7 */
432 .pvr_mask = 0xffff0000,
433 .pvr_value = 0x003f0000,
Joel Schopp635f5a62008-06-19 06:18:21 +1000434 .cpu_name = "POWER7 (raw)",
Michael Neulinge952e6c2008-06-18 10:47:26 +1000435 .cpu_features = CPU_FTRS_POWER7,
436 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000437 .mmu_features = MMU_FTRS_POWER7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000438 .icache_bsize = 128,
439 .dcache_bsize = 128,
440 .num_pmcs = 6,
441 .pmc_type = PPC_PMC_IBM,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000442 .oprofile_cpu_type = "ppc64/power7",
443 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100444 .cpu_setup = __setup_cpu_power7,
445 .cpu_restore = __restore_cpu_power7,
Michael Neulinge952e6c2008-06-18 10:47:26 +1000446 .platform = "power7",
447 },
Michael Neuling6f08cb32010-11-17 18:52:44 +0000448 { /* Power7+ */
449 .pvr_mask = 0xffff0000,
450 .pvr_value = 0x004A0000,
451 .cpu_name = "POWER7+ (raw)",
452 .cpu_features = CPU_FTRS_POWER7,
453 .cpu_user_features = COMMON_USER_POWER7,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000454 .mmu_features = MMU_FTRS_POWER7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000455 .icache_bsize = 128,
456 .dcache_bsize = 128,
457 .num_pmcs = 6,
458 .pmc_type = PPC_PMC_IBM,
459 .oprofile_cpu_type = "ppc64/power7",
460 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt24cc67d2011-01-20 18:50:55 +1100461 .cpu_setup = __setup_cpu_power7,
462 .cpu_restore = __restore_cpu_power7,
Michael Neuling6f08cb32010-11-17 18:52:44 +0000463 .platform = "power7+",
464 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000465 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000466 .pvr_mask = 0xffff0000,
467 .pvr_value = 0x00700000,
468 .cpu_name = "Cell Broadband Engine",
469 .cpu_features = CPU_FTRS_CELL,
470 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb0212006-03-01 15:07:07 +1100471 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
472 PPC_FEATURE_SMT,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000473 .mmu_features = MMU_FTRS_CELL,
Stephen Rothwell49209602005-10-12 15:55:09 +1000474 .icache_bsize = 128,
475 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100476 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600477 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100478 .oprofile_cpu_type = "ppc64/cell-be",
479 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100480 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000481 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500482 { /* PA Semi PA6T */
483 .pvr_mask = 0x7fff0000,
484 .pvr_value = 0x00900000,
485 .cpu_name = "PA6T",
486 .cpu_features = CPU_FTRS_PA6T,
487 .cpu_user_features = COMMON_USER_PA6T,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000488 .mmu_features = MMU_FTRS_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500489 .icache_bsize = 64,
490 .dcache_bsize = 64,
491 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600492 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600493 .cpu_setup = __setup_cpu_pa6t,
494 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000495 .oprofile_cpu_type = "ppc64/pa6t",
496 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500497 .platform = "pa6t",
498 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000499 { /* default match */
500 .pvr_mask = 0x00000000,
501 .pvr_value = 0x00000000,
502 .cpu_name = "POWER4 (compatible)",
503 .cpu_features = CPU_FTRS_COMPATIBLE,
504 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +0000505 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
Stephen Rothwell49209602005-10-12 15:55:09 +1000506 .icache_bsize = 128,
507 .dcache_bsize = 128,
508 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600509 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100510 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000511 }
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000512#endif /* CONFIG_PPC_BOOK3S_64 */
Benjamin Herrenschmidt2d27cfd2009-07-23 23:15:59 +0000513
Stephen Rothwell49209602005-10-12 15:55:09 +1000514#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700515#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000516 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 .pvr_mask = 0xffff0000,
518 .pvr_value = 0x00010000,
519 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500520 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000521 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000522 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000523 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 .icache_bsize = 32,
525 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100526 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100527 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700528 },
529 { /* 603 */
530 .pvr_mask = 0xffff0000,
531 .pvr_value = 0x00030000,
532 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500533 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000534 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000535 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 .icache_bsize = 32,
537 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100538 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100539 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100540 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541 },
542 { /* 603e */
543 .pvr_mask = 0xffff0000,
544 .pvr_value = 0x00060000,
545 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500546 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000547 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000548 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700549 .icache_bsize = 32,
550 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100551 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100552 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100553 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700554 },
555 { /* 603ev */
556 .pvr_mask = 0xffff0000,
557 .pvr_value = 0x00070000,
558 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500559 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000560 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000561 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562 .icache_bsize = 32,
563 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100564 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100565 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100566 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 },
568 { /* 604 */
569 .pvr_mask = 0xffff0000,
570 .pvr_value = 0x00040000,
571 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500572 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000573 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000574 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 .icache_bsize = 32,
576 .dcache_bsize = 32,
577 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100578 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100579 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100580 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 },
582 { /* 604e */
583 .pvr_mask = 0xfffff000,
584 .pvr_value = 0x00090000,
585 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500586 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000587 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000588 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700589 .icache_bsize = 32,
590 .dcache_bsize = 32,
591 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100592 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100593 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100594 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595 },
596 { /* 604r */
597 .pvr_mask = 0xffff0000,
598 .pvr_value = 0x00090000,
599 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500600 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000601 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000602 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 .icache_bsize = 32,
604 .dcache_bsize = 32,
605 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100606 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100607 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100608 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700609 },
610 { /* 604ev */
611 .pvr_mask = 0xffff0000,
612 .pvr_value = 0x000a0000,
613 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500614 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000615 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000616 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 .icache_bsize = 32,
618 .dcache_bsize = 32,
619 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100621 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100622 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 },
624 { /* 740/750 (0x4202, don't support TAU ?) */
625 .pvr_mask = 0xffffffff,
626 .pvr_value = 0x00084202,
627 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500628 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000629 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000630 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631 .icache_bsize = 32,
632 .dcache_bsize = 32,
633 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100634 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100635 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100636 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700637 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 { /* 750CX (80100 and 8010x?) */
639 .pvr_mask = 0xfffffff0,
640 .pvr_value = 0x00080100,
641 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500642 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000643 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000644 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645 .icache_bsize = 32,
646 .dcache_bsize = 32,
647 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100648 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100649 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100650 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651 },
652 { /* 750CX (82201 and 82202) */
653 .pvr_mask = 0xfffffff0,
654 .pvr_value = 0x00082200,
655 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500656 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000657 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000658 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 .icache_bsize = 32,
660 .dcache_bsize = 32,
661 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000662 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100663 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100664 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100665 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 },
667 { /* 750CXe (82214) */
668 .pvr_mask = 0xfffffff0,
669 .pvr_value = 0x00082210,
670 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500671 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000672 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000673 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 .icache_bsize = 32,
675 .dcache_bsize = 32,
676 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000677 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100678 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100679 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100680 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700682 { /* 750CXe "Gekko" (83214) */
683 .pvr_mask = 0xffffffff,
684 .pvr_value = 0x00083214,
685 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500686 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000687 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000688 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700689 .icache_bsize = 32,
690 .dcache_bsize = 32,
691 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000692 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100693 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100694 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100695 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700696 },
Albert Herranz45158dc2009-12-12 06:31:46 +0000697 { /* 750CL (and "Broadway") */
698 .pvr_mask = 0xfffff0e0,
699 .pvr_value = 0x00087000,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500700 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000701 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500702 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000703 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500704 .icache_bsize = 32,
705 .dcache_bsize = 32,
706 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000707 .pmc_type = PPC_PMC_IBM,
Josh Boyera14c4502007-04-13 04:33:25 +1000708 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100709 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500710 .platform = "ppc750",
Dragos Tatulea04f56534772009-09-16 11:58:15 +0300711 .oprofile_cpu_type = "ppc/750",
712 .oprofile_type = PPC_OPROFILE_G4,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500713 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700714 { /* 745/755 */
715 .pvr_mask = 0xfffff000,
716 .pvr_value = 0x00083000,
717 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500718 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000719 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000720 .mmu_features = MMU_FTR_HPTE_TABLE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700721 .icache_bsize = 32,
722 .dcache_bsize = 32,
723 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000724 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100725 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100726 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100727 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700728 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 { /* 750FX rev 1.x */
730 .pvr_mask = 0xffffff00,
731 .pvr_value = 0x70000100,
732 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500733 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000734 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000735 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736 .icache_bsize = 32,
737 .dcache_bsize = 32,
738 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000739 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100740 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100741 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100742 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000743 .oprofile_cpu_type = "ppc/750",
744 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745 },
746 { /* 750FX rev 2.0 must disable HID0[DPM] */
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x70000200,
749 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500750 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000751 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000752 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 .icache_bsize = 32,
754 .dcache_bsize = 32,
755 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000756 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100757 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100758 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100759 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000760 .oprofile_cpu_type = "ppc/750",
761 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700762 },
763 { /* 750FX (All revs except 2.0) */
764 .pvr_mask = 0xffff0000,
765 .pvr_value = 0x70000000,
766 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500767 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000768 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000769 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770 .icache_bsize = 32,
771 .dcache_bsize = 32,
772 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000773 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100774 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100775 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100776 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000777 .oprofile_cpu_type = "ppc/750",
778 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700779 },
780 { /* 750GX */
781 .pvr_mask = 0xffff0000,
782 .pvr_value = 0x70020000,
783 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500784 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000785 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000786 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787 .icache_bsize = 32,
788 .dcache_bsize = 32,
789 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000790 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100791 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100792 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100793 .platform = "ppc750",
Octavian Purdila7c9583a2009-03-04 02:02:42 +0000794 .oprofile_cpu_type = "ppc/750",
795 .oprofile_type = PPC_OPROFILE_G4,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796 },
797 { /* 740/750 (L2CR bit need fixup for 740) */
798 .pvr_mask = 0xffff0000,
799 .pvr_value = 0x00080000,
800 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500801 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000802 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000803 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 .icache_bsize = 32,
805 .dcache_bsize = 32,
806 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000807 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100809 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100810 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700811 },
812 { /* 7400 rev 1.1 ? (no TAU) */
813 .pvr_mask = 0xffffffff,
814 .pvr_value = 0x000c1101,
815 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500816 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000817 .cpu_user_features = COMMON_USER |
818 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000819 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820 .icache_bsize = 32,
821 .dcache_bsize = 32,
822 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000823 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100824 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100825 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100826 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827 },
828 { /* 7400 */
829 .pvr_mask = 0xffff0000,
830 .pvr_value = 0x000c0000,
831 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500832 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000833 .cpu_user_features = COMMON_USER |
834 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000835 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700836 .icache_bsize = 32,
837 .dcache_bsize = 32,
838 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000839 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100840 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100841 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100842 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700843 },
844 { /* 7410 */
845 .pvr_mask = 0xffff0000,
846 .pvr_value = 0x800c0000,
847 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500848 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000849 .cpu_user_features = COMMON_USER |
850 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000851 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700852 .icache_bsize = 32,
853 .dcache_bsize = 32,
854 .num_pmcs = 4,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000855 .pmc_type = PPC_PMC_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100857 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859 },
860 { /* 7450 2.0 - no doze/nap */
861 .pvr_mask = 0xffffffff,
862 .pvr_value = 0x80000200,
863 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500864 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000865 .cpu_user_features = COMMON_USER |
866 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000867 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700868 .icache_bsize = 32,
869 .dcache_bsize = 32,
870 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000871 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600872 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600873 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000874 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100875 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100876 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700877 },
878 { /* 7450 2.1 */
879 .pvr_mask = 0xffffffff,
880 .pvr_value = 0x80000201,
881 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500882 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000883 .cpu_user_features = COMMON_USER |
884 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000885 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 .icache_bsize = 32,
887 .dcache_bsize = 32,
888 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000889 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600890 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600891 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000892 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100893 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100894 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895 },
896 { /* 7450 2.3 and newer */
897 .pvr_mask = 0xffff0000,
898 .pvr_value = 0x80000000,
899 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500900 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000901 .cpu_user_features = COMMON_USER |
902 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000903 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 .icache_bsize = 32,
905 .dcache_bsize = 32,
906 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000907 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600908 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600909 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000910 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100911 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100912 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700913 },
914 { /* 7455 rev 1.x */
915 .pvr_mask = 0xffffff00,
916 .pvr_value = 0x80010100,
917 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500918 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000919 .cpu_user_features = COMMON_USER |
920 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000921 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922 .icache_bsize = 32,
923 .dcache_bsize = 32,
924 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000925 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600926 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600927 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000928 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100929 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100930 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931 },
932 { /* 7455 rev 2.0 */
933 .pvr_mask = 0xffffffff,
934 .pvr_value = 0x80010200,
935 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500936 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000937 .cpu_user_features = COMMON_USER |
938 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000939 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 .icache_bsize = 32,
941 .dcache_bsize = 32,
942 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000943 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600944 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600945 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000946 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100947 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100948 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700949 },
950 { /* 7455 others */
951 .pvr_mask = 0xffff0000,
952 .pvr_value = 0x80010000,
953 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500954 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000955 .cpu_user_features = COMMON_USER |
956 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000957 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700958 .icache_bsize = 32,
959 .dcache_bsize = 32,
960 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000961 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600962 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600963 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000964 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100965 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100966 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 },
968 { /* 7447/7457 Rev 1.0 */
969 .pvr_mask = 0xffffffff,
970 .pvr_value = 0x80020100,
971 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500972 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000973 .cpu_user_features = COMMON_USER |
974 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000975 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700976 .icache_bsize = 32,
977 .dcache_bsize = 32,
978 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000979 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600980 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600981 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000982 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100983 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100984 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985 },
986 { /* 7447/7457 Rev 1.1 */
987 .pvr_mask = 0xffffffff,
988 .pvr_value = 0x80020101,
989 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500990 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000991 .cpu_user_features = COMMON_USER |
992 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +0000993 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 .icache_bsize = 32,
995 .dcache_bsize = 32,
996 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +1000997 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -0600998 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600999 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001000 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001001 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001002 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001003 },
1004 { /* 7447/7457 Rev 1.2 and later */
1005 .pvr_mask = 0xffff0000,
1006 .pvr_value = 0x80020000,
1007 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -05001008 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001009 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001010 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 .icache_bsize = 32,
1012 .dcache_bsize = 32,
1013 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001014 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001015 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001016 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001017 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001018 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001019 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001020 },
1021 { /* 7447A */
1022 .pvr_mask = 0xffff0000,
1023 .pvr_value = 0x80030000,
1024 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001025 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001026 .cpu_user_features = COMMON_USER |
1027 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001028 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001029 .icache_bsize = 32,
1030 .dcache_bsize = 32,
1031 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001032 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001033 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001034 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001035 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001036 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001037 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 },
Kumar Galabbde6302005-09-03 15:55:55 -07001039 { /* 7448 */
1040 .pvr_mask = 0xffff0000,
1041 .pvr_value = 0x80040000,
1042 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -05001043 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +10001044 .cpu_user_features = COMMON_USER |
1045 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001046 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
Kumar Galabbde6302005-09-03 15:55:55 -07001047 .icache_bsize = 32,
1048 .dcache_bsize = 32,
1049 .num_pmcs = 6,
Benjamin Herrenschmidtb950bdd2008-08-18 14:23:51 +10001050 .pmc_type = PPC_PMC_G4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001051 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -06001052 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001053 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001054 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001055 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -07001056 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001057 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1058 .pvr_mask = 0x7fff0000,
1059 .pvr_value = 0x00810000,
1060 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001061 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +10001062 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001063 .mmu_features = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001064 .icache_bsize = 32,
1065 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001066 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001067 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001068 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001069 },
1070 { /* All G2_LE (603e core, plus some) have the same pvr */
1071 .pvr_mask = 0x7fff0000,
1072 .pvr_value = 0x00820000,
1073 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -05001074 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +10001075 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001076 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001077 .icache_bsize = 32,
1078 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001079 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001080 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001081 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001082 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001083 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 .pvr_mask = 0x7fff0000,
1085 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001086 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -05001087 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +10001088 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001089 .mmu_features = MMU_FTR_USE_HIGH_BATS,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 .icache_bsize = 32,
1091 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001092 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001093 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001094 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001095 },
Kim Phillips6c4a2502006-10-02 20:10:24 -05001096 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1097 .pvr_mask = 0x7fff0000,
1098 .pvr_value = 0x00840000,
1099 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -06001100 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001101 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Kumar Gala2319f122009-03-19 03:55:41 +00001102 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1103 MMU_FTR_NEED_DTLB_SW_LRU,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001104 .icache_bsize = 32,
1105 .dcache_bsize = 32,
1106 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001107 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -05001108 .platform = "ppc603",
1109 },
Li Yanga58d5242007-10-19 19:38:42 +08001110 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -06001111 .pvr_mask = 0x7fff0000,
1112 .pvr_value = 0x00850000,
1113 .cpu_name = "e300c3",
1114 .cpu_features = CPU_FTRS_E300,
1115 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001116 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1117 MMU_FTR_NEED_DTLB_SW_LRU,
Scott Wood57933f82006-12-01 12:57:05 -06001118 .icache_bsize = 32,
1119 .dcache_bsize = 32,
1120 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001121 .num_pmcs = 4,
1122 .oprofile_cpu_type = "ppc/e300",
1123 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -06001124 .platform = "ppc603",
1125 },
Li Yanga58d5242007-10-19 19:38:42 +08001126 { /* e300c4 (e300c1, plus one IU) */
1127 .pvr_mask = 0x7fff0000,
1128 .pvr_value = 0x00860000,
1129 .cpu_name = "e300c4",
1130 .cpu_features = CPU_FTRS_E300,
1131 .cpu_user_features = COMMON_USER,
Kumar Gala2319f122009-03-19 03:55:41 +00001132 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1133 MMU_FTR_NEED_DTLB_SW_LRU,
Li Yanga58d5242007-10-19 19:38:42 +08001134 .icache_bsize = 32,
1135 .dcache_bsize = 32,
1136 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001137 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -06001138 .num_pmcs = 4,
1139 .oprofile_cpu_type = "ppc/e300",
1140 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +08001141 .platform = "ppc603",
1142 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001143 { /* default match, we assume split I/D cache & TB (non-601)... */
1144 .pvr_mask = 0x00000000,
1145 .pvr_value = 0x00000000,
1146 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001147 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +10001148 .cpu_user_features = COMMON_USER,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001149 .mmu_features = MMU_FTR_HPTE_TABLE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001150 .icache_bsize = 32,
1151 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001152 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001153 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001154 },
1155#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156#ifdef CONFIG_8xx
1157 { /* 8xx */
1158 .pvr_mask = 0xffff0000,
1159 .pvr_value = 0x00500000,
1160 .cpu_name = "8xx",
1161 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1162 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001163 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001165 .mmu_features = MMU_FTR_TYPE_8xx,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001166 .icache_bsize = 16,
1167 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001168 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 },
1170#endif /* CONFIG_8xx */
1171#ifdef CONFIG_40x
1172 { /* 403GC */
1173 .pvr_mask = 0xffffff00,
1174 .pvr_value = 0x00200200,
1175 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001176 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001177 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001178 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001179 .icache_bsize = 16,
1180 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001181 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001182 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 },
1184 { /* 403GCX */
1185 .pvr_mask = 0xffffff00,
1186 .pvr_value = 0x00201400,
1187 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001188 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001189 .cpu_user_features = PPC_FEATURE_32 |
1190 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001191 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001192 .icache_bsize = 16,
1193 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001194 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001195 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196 },
1197 { /* 403G ?? */
1198 .pvr_mask = 0xffff0000,
1199 .pvr_value = 0x00200000,
1200 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001201 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001202 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001203 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001204 .icache_bsize = 16,
1205 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001206 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001207 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001208 },
1209 { /* 405GP */
1210 .pvr_mask = 0xffff0000,
1211 .pvr_value = 0x40110000,
1212 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001213 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001214 .cpu_user_features = PPC_FEATURE_32 |
1215 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001216 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001217 .icache_bsize = 32,
1218 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001219 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001220 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001221 },
1222 { /* STB 03xxx */
1223 .pvr_mask = 0xffff0000,
1224 .pvr_value = 0x40130000,
1225 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001226 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001227 .cpu_user_features = PPC_FEATURE_32 |
1228 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001229 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001230 .icache_bsize = 32,
1231 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001232 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001233 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001234 },
1235 { /* STB 04xxx */
1236 .pvr_mask = 0xffff0000,
1237 .pvr_value = 0x41810000,
1238 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001239 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001240 .cpu_user_features = PPC_FEATURE_32 |
1241 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001242 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001243 .icache_bsize = 32,
1244 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001245 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001246 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001247 },
1248 { /* NP405L */
1249 .pvr_mask = 0xffff0000,
1250 .pvr_value = 0x41610000,
1251 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001252 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001253 .cpu_user_features = PPC_FEATURE_32 |
1254 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001255 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256 .icache_bsize = 32,
1257 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001258 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001259 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001260 },
1261 { /* NP4GS3 */
1262 .pvr_mask = 0xffff0000,
1263 .pvr_value = 0x40B10000,
1264 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001265 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001266 .cpu_user_features = PPC_FEATURE_32 |
1267 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001268 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001269 .icache_bsize = 32,
1270 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001271 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001272 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001273 },
1274 { /* NP405H */
1275 .pvr_mask = 0xffff0000,
1276 .pvr_value = 0x41410000,
1277 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001278 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001279 .cpu_user_features = PPC_FEATURE_32 |
1280 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001281 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282 .icache_bsize = 32,
1283 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001284 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001285 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001286 },
1287 { /* 405GPr */
1288 .pvr_mask = 0xffff0000,
1289 .pvr_value = 0x50910000,
1290 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001291 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001292 .cpu_user_features = PPC_FEATURE_32 |
1293 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001294 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001295 .icache_bsize = 32,
1296 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001297 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001298 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001299 },
1300 { /* STBx25xx */
1301 .pvr_mask = 0xffff0000,
1302 .pvr_value = 0x51510000,
1303 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001304 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 .cpu_user_features = PPC_FEATURE_32 |
1306 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001307 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 .icache_bsize = 32,
1309 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001310 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001311 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001312 },
1313 { /* 405LP */
1314 .pvr_mask = 0xffff0000,
1315 .pvr_value = 0x41F10000,
1316 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001317 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001318 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001319 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 .icache_bsize = 32,
1321 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001322 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001323 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324 },
1325 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001326 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001327 .pvr_value = 0x20010000,
1328 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001329 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001330 .cpu_user_features = PPC_FEATURE_32 |
1331 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001332 .mmu_features = MMU_FTR_TYPE_40x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333 .icache_bsize = 32,
1334 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001335 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001336 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001338 { /* Xilinx Virtex-4 FX */
1339 .pvr_mask = 0xfffff000,
1340 .pvr_value = 0x20011000,
1341 .cpu_name = "Virtex-4 FX",
1342 .cpu_features = CPU_FTRS_40X,
1343 .cpu_user_features = PPC_FEATURE_32 |
1344 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001345 .mmu_features = MMU_FTR_TYPE_40x,
Grant C. Likely72646c72006-01-19 01:13:20 -07001346 .icache_bsize = 32,
1347 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001348 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001349 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001350 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001351 { /* 405EP */
1352 .pvr_mask = 0xffff0000,
1353 .pvr_value = 0x51210000,
1354 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001355 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001356 .cpu_user_features = PPC_FEATURE_32 |
1357 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001358 .mmu_features = MMU_FTR_TYPE_40x,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001361 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001362 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001363 },
Lee Nipperff349102010-07-09 01:17:16 +00001364 { /* 405EX Rev. A/B with Security */
1365 .pvr_mask = 0xffff000f,
1366 .pvr_value = 0x12910007,
1367 .cpu_name = "405EX Rev. A/B",
Stefan Roese5d8476c2007-10-11 22:08:14 +10001368 .cpu_features = CPU_FTRS_40X,
1369 .cpu_user_features = PPC_FEATURE_32 |
1370 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001371 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001372 .icache_bsize = 32,
1373 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001374 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001375 .platform = "ppc405",
1376 },
Lee Nipperff349102010-07-09 01:17:16 +00001377 { /* 405EX Rev. C without Security */
1378 .pvr_mask = 0xffff000f,
1379 .pvr_value = 0x1291000d,
1380 .cpu_name = "405EX Rev. C",
1381 .cpu_features = CPU_FTRS_40X,
1382 .cpu_user_features = PPC_FEATURE_32 |
1383 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1384 .mmu_features = MMU_FTR_TYPE_40x,
1385 .icache_bsize = 32,
1386 .dcache_bsize = 32,
1387 .machine_check = machine_check_4xx,
1388 .platform = "ppc405",
1389 },
1390 { /* 405EX Rev. C with Security */
1391 .pvr_mask = 0xffff000f,
1392 .pvr_value = 0x1291000f,
1393 .cpu_name = "405EX Rev. C",
1394 .cpu_features = CPU_FTRS_40X,
1395 .cpu_user_features = PPC_FEATURE_32 |
1396 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1397 .mmu_features = MMU_FTR_TYPE_40x,
1398 .icache_bsize = 32,
1399 .dcache_bsize = 32,
1400 .machine_check = machine_check_4xx,
1401 .platform = "ppc405",
1402 },
1403 { /* 405EX Rev. D without Security */
1404 .pvr_mask = 0xffff000f,
1405 .pvr_value = 0x12910003,
1406 .cpu_name = "405EX Rev. D",
1407 .cpu_features = CPU_FTRS_40X,
1408 .cpu_user_features = PPC_FEATURE_32 |
1409 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1410 .mmu_features = MMU_FTR_TYPE_40x,
1411 .icache_bsize = 32,
1412 .dcache_bsize = 32,
1413 .machine_check = machine_check_4xx,
1414 .platform = "ppc405",
1415 },
1416 { /* 405EX Rev. D with Security */
1417 .pvr_mask = 0xffff000f,
1418 .pvr_value = 0x12910005,
1419 .cpu_name = "405EX Rev. D",
1420 .cpu_features = CPU_FTRS_40X,
1421 .cpu_user_features = PPC_FEATURE_32 |
1422 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1423 .mmu_features = MMU_FTR_TYPE_40x,
1424 .icache_bsize = 32,
1425 .dcache_bsize = 32,
1426 .machine_check = machine_check_4xx,
1427 .platform = "ppc405",
1428 },
1429 { /* 405EXr Rev. A/B without Security */
1430 .pvr_mask = 0xffff000f,
1431 .pvr_value = 0x12910001,
1432 .cpu_name = "405EXr Rev. A/B",
1433 .cpu_features = CPU_FTRS_40X,
1434 .cpu_user_features = PPC_FEATURE_32 |
1435 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1436 .mmu_features = MMU_FTR_TYPE_40x,
1437 .icache_bsize = 32,
1438 .dcache_bsize = 32,
1439 .machine_check = machine_check_4xx,
1440 .platform = "ppc405",
1441 },
1442 { /* 405EXr Rev. C without Security */
1443 .pvr_mask = 0xffff000f,
1444 .pvr_value = 0x12910009,
1445 .cpu_name = "405EXr Rev. C",
1446 .cpu_features = CPU_FTRS_40X,
1447 .cpu_user_features = PPC_FEATURE_32 |
1448 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1449 .mmu_features = MMU_FTR_TYPE_40x,
1450 .icache_bsize = 32,
1451 .dcache_bsize = 32,
1452 .machine_check = machine_check_4xx,
1453 .platform = "ppc405",
1454 },
1455 { /* 405EXr Rev. C with Security */
1456 .pvr_mask = 0xffff000f,
1457 .pvr_value = 0x1291000b,
1458 .cpu_name = "405EXr Rev. C",
1459 .cpu_features = CPU_FTRS_40X,
1460 .cpu_user_features = PPC_FEATURE_32 |
1461 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1462 .mmu_features = MMU_FTR_TYPE_40x,
1463 .icache_bsize = 32,
1464 .dcache_bsize = 32,
1465 .machine_check = machine_check_4xx,
1466 .platform = "ppc405",
1467 },
1468 { /* 405EXr Rev. D without Security */
1469 .pvr_mask = 0xffff000f,
Stefan Roeseb676d842008-01-15 18:09:15 +11001470 .pvr_value = 0x12910000,
Lee Nipperff349102010-07-09 01:17:16 +00001471 .cpu_name = "405EXr Rev. D",
1472 .cpu_features = CPU_FTRS_40X,
1473 .cpu_user_features = PPC_FEATURE_32 |
1474 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1475 .mmu_features = MMU_FTR_TYPE_40x,
1476 .icache_bsize = 32,
1477 .dcache_bsize = 32,
1478 .machine_check = machine_check_4xx,
1479 .platform = "ppc405",
1480 },
1481 { /* 405EXr Rev. D with Security */
1482 .pvr_mask = 0xffff000f,
1483 .pvr_value = 0x12910002,
1484 .cpu_name = "405EXr Rev. D",
Stefan Roeseb676d842008-01-15 18:09:15 +11001485 .cpu_features = CPU_FTRS_40X,
1486 .cpu_user_features = PPC_FEATURE_32 |
1487 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001488 .mmu_features = MMU_FTR_TYPE_40x,
Stefan Roeseb676d842008-01-15 18:09:15 +11001489 .icache_bsize = 32,
1490 .dcache_bsize = 32,
1491 .machine_check = machine_check_4xx,
1492 .platform = "ppc405",
1493 },
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001494 {
1495 /* 405EZ */
1496 .pvr_mask = 0xffff0000,
1497 .pvr_value = 0x41510000,
1498 .cpu_name = "405EZ",
1499 .cpu_features = CPU_FTRS_40X,
1500 .cpu_user_features = PPC_FEATURE_32 |
1501 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001502 .mmu_features = MMU_FTR_TYPE_40x,
Josh Boyerdf8f71f2008-10-09 08:56:38 -04001503 .icache_bsize = 32,
1504 .dcache_bsize = 32,
1505 .machine_check = machine_check_4xx,
1506 .platform = "ppc405",
1507 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001508 { /* default match */
1509 .pvr_mask = 0x00000000,
1510 .pvr_value = 0x00000000,
1511 .cpu_name = "(generic 40x PPC)",
1512 .cpu_features = CPU_FTRS_40X,
1513 .cpu_user_features = PPC_FEATURE_32 |
1514 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001515 .mmu_features = MMU_FTR_TYPE_40x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001516 .icache_bsize = 32,
1517 .dcache_bsize = 32,
1518 .machine_check = machine_check_4xx,
1519 .platform = "ppc405",
1520 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001521
1522#endif /* CONFIG_40x */
1523#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001524 {
1525 .pvr_mask = 0xf0000fff,
1526 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001527 .cpu_name = "440GR Rev. A",
1528 .cpu_features = CPU_FTRS_44X,
1529 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001530 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001531 .icache_bsize = 32,
1532 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001533 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001534 .platform = "ppc440",
1535 },
1536 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1537 .pvr_mask = 0xf0000fff,
1538 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001539 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001540 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001541 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001542 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001543 .icache_bsize = 32,
1544 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001545 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001546 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001547 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001548 },
1549 {
1550 .pvr_mask = 0xf0000fff,
1551 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001552 .cpu_name = "440GR Rev. B",
1553 .cpu_features = CPU_FTRS_44X,
1554 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001555 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001556 .icache_bsize = 32,
1557 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001558 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001559 .platform = "ppc440",
1560 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001561 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1562 .pvr_mask = 0xf0000ff7,
1563 .pvr_value = 0x400008d4,
1564 .cpu_name = "440EP Rev. C",
1565 .cpu_features = CPU_FTRS_44X,
1566 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001567 .mmu_features = MMU_FTR_TYPE_44x,
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001568 .icache_bsize = 32,
1569 .dcache_bsize = 32,
1570 .cpu_setup = __setup_cpu_440ep,
1571 .machine_check = machine_check_4xx,
1572 .platform = "ppc440",
1573 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001574 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1575 .pvr_mask = 0xf0000fff,
1576 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001577 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001578 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001579 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001580 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001581 .icache_bsize = 32,
1582 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001583 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001584 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001585 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001586 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001587 { /* 440GRX */
1588 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001589 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001590 .cpu_name = "440GRX",
1591 .cpu_features = CPU_FTRS_44X,
1592 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001593 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001594 .icache_bsize = 32,
1595 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001596 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001597 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001598 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001599 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001600 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1601 .pvr_mask = 0xf0000ffb,
1602 .pvr_value = 0x200008D8,
1603 .cpu_name = "440EPX",
1604 .cpu_features = CPU_FTRS_44X,
1605 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001606 .mmu_features = MMU_FTR_TYPE_44x,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001607 .icache_bsize = 32,
1608 .dcache_bsize = 32,
1609 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001610 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001611 .platform = "ppc440",
1612 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001613 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001614 .pvr_mask = 0xf0000fff,
1615 .pvr_value = 0x40000440,
1616 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001617 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001618 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001619 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001620 .icache_bsize = 32,
1621 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001622 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001623 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001624 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001625 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001626 .pvr_mask = 0xf0000fff,
1627 .pvr_value = 0x40000481,
1628 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001629 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001630 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001631 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001632 .icache_bsize = 32,
1633 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001634 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001635 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001636 },
1637 { /* 440GX Rev. A */
1638 .pvr_mask = 0xf0000fff,
1639 .pvr_value = 0x50000850,
1640 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001641 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001642 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001643 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001644 .icache_bsize = 32,
1645 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001646 .cpu_setup = __setup_cpu_440gx,
1647 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001648 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001649 },
1650 { /* 440GX Rev. B */
1651 .pvr_mask = 0xf0000fff,
1652 .pvr_value = 0x50000851,
1653 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001654 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001655 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001656 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001657 .icache_bsize = 32,
1658 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001659 .cpu_setup = __setup_cpu_440gx,
1660 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001661 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001662 },
1663 { /* 440GX Rev. C */
1664 .pvr_mask = 0xf0000fff,
1665 .pvr_value = 0x50000892,
1666 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001667 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001668 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001669 .mmu_features = MMU_FTR_TYPE_44x,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001670 .icache_bsize = 32,
1671 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001672 .cpu_setup = __setup_cpu_440gx,
1673 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001674 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001675 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001676 { /* 440GX Rev. F */
1677 .pvr_mask = 0xf0000fff,
1678 .pvr_value = 0x50000894,
1679 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001680 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001681 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001682 .mmu_features = MMU_FTR_TYPE_44x,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001683 .icache_bsize = 32,
1684 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001685 .cpu_setup = __setup_cpu_440gx,
1686 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001687 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001688 },
Matt Porter656de7e2005-09-03 15:55:42 -07001689 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001690 .pvr_mask = 0xfff00fff,
1691 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001692 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001693 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001694 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001695 .mmu_features = MMU_FTR_TYPE_44x,
Matt Porter656de7e2005-09-03 15:55:42 -07001696 .icache_bsize = 32,
1697 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001698 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001699 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001700 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001701 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001702 .pvr_mask = 0xfff00fff,
1703 .pvr_value = 0x53400890,
1704 .cpu_name = "440SPe Rev. A",
1705 .cpu_features = CPU_FTRS_44X,
1706 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001707 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreier333e6152007-06-16 05:36:32 +10001708 .icache_bsize = 32,
1709 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001710 .cpu_setup = __setup_cpu_440spe,
1711 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001712 .platform = "ppc440",
1713 },
1714 { /* 440SPe Rev. B */
1715 .pvr_mask = 0xfff00fff,
1716 .pvr_value = 0x53400891,
1717 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001718 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001719 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001720 .mmu_features = MMU_FTR_TYPE_44x,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001721 .icache_bsize = 32,
1722 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001723 .cpu_setup = __setup_cpu_440spe,
1724 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001725 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001726 },
John Linn23e72372008-07-01 09:42:07 -07001727 { /* 440 in Xilinx Virtex-5 FXT */
1728 .pvr_mask = 0xfffffff0,
1729 .pvr_value = 0x7ff21910,
1730 .cpu_name = "440 in Virtex-5 FXT",
1731 .cpu_features = CPU_FTRS_44X,
1732 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001733 .mmu_features = MMU_FTR_TYPE_44x,
John Linn23e72372008-07-01 09:42:07 -07001734 .icache_bsize = 32,
1735 .dcache_bsize = 32,
Grant Likely640d17d2008-12-04 05:39:55 +00001736 .cpu_setup = __setup_cpu_440x5,
1737 .machine_check = machine_check_440A,
John Linn23e72372008-07-01 09:42:07 -07001738 .platform = "ppc440",
1739 },
Stefan Roese464076a2008-02-24 08:07:41 +11001740 { /* 460EX */
Stefan Roese20d70342009-07-29 07:04:46 +00001741 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001742 .pvr_value = 0x13020002,
1743 .cpu_name = "460EX",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001744 .cpu_features = CPU_FTRS_440x6,
Stefan Roese464076a2008-02-24 08:07:41 +11001745 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001746 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001747 .icache_bsize = 32,
1748 .dcache_bsize = 32,
1749 .cpu_setup = __setup_cpu_460ex,
1750 .machine_check = machine_check_440A,
1751 .platform = "ppc440",
1752 },
Stefan Roese20d70342009-07-29 07:04:46 +00001753 { /* 460EX Rev B */
1754 .pvr_mask = 0xffff0007,
1755 .pvr_value = 0x13020004,
1756 .cpu_name = "460EX Rev. B",
1757 .cpu_features = CPU_FTRS_440x6,
1758 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1759 .mmu_features = MMU_FTR_TYPE_44x,
1760 .icache_bsize = 32,
1761 .dcache_bsize = 32,
1762 .cpu_setup = __setup_cpu_460ex,
1763 .machine_check = machine_check_440A,
1764 .platform = "ppc440",
1765 },
Stefan Roese464076a2008-02-24 08:07:41 +11001766 { /* 460GT */
Stefan Roese20d70342009-07-29 07:04:46 +00001767 .pvr_mask = 0xffff0006,
Stefan Roese464076a2008-02-24 08:07:41 +11001768 .pvr_value = 0x13020000,
1769 .cpu_name = "460GT",
Benjamin Herrenschmidt6d2170b2008-12-18 19:13:22 +00001770 .cpu_features = CPU_FTRS_440x6,
Josh Boyer939e6222008-06-11 07:52:40 -04001771 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001772 .mmu_features = MMU_FTR_TYPE_44x,
Stefan Roese464076a2008-02-24 08:07:41 +11001773 .icache_bsize = 32,
1774 .dcache_bsize = 32,
Josh Boyer939e6222008-06-11 07:52:40 -04001775 .cpu_setup = __setup_cpu_460gt,
Stefan Roese464076a2008-02-24 08:07:41 +11001776 .machine_check = machine_check_440A,
1777 .platform = "ppc440",
1778 },
Stefan Roese20d70342009-07-29 07:04:46 +00001779 { /* 460GT Rev B */
1780 .pvr_mask = 0xffff0007,
1781 .pvr_value = 0x13020005,
1782 .cpu_name = "460GT Rev. B",
1783 .cpu_features = CPU_FTRS_440x6,
1784 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1785 .mmu_features = MMU_FTR_TYPE_44x,
1786 .icache_bsize = 32,
1787 .dcache_bsize = 32,
1788 .cpu_setup = __setup_cpu_460gt,
1789 .machine_check = machine_check_440A,
1790 .platform = "ppc440",
1791 },
Madhulika Madishetty6c712092009-02-05 13:31:36 +00001792 { /* 460SX */
1793 .pvr_mask = 0xffffff00,
1794 .pvr_value = 0x13541800,
1795 .cpu_name = "460SX",
1796 .cpu_features = CPU_FTRS_44X,
1797 .cpu_user_features = COMMON_USER_BOOKE,
1798 .mmu_features = MMU_FTR_TYPE_44x,
1799 .icache_bsize = 32,
1800 .dcache_bsize = 32,
1801 .cpu_setup = __setup_cpu_460sx,
1802 .machine_check = machine_check_440A,
1803 .platform = "ppc440",
1804 },
Tirumala Marri6edc3232010-09-13 13:26:11 +00001805 { /* 464 in APM821xx */
1806 .pvr_mask = 0xffffff00,
1807 .pvr_value = 0x12C41C80,
1808 .cpu_name = "APM821XX",
1809 .cpu_features = CPU_FTRS_44X,
1810 .cpu_user_features = COMMON_USER_BOOKE |
1811 PPC_FEATURE_HAS_FPU,
1812 .mmu_features = MMU_FTR_TYPE_44x,
1813 .icache_bsize = 32,
1814 .dcache_bsize = 32,
1815 .cpu_setup = __setup_cpu_apm821xx,
1816 .machine_check = machine_check_440A,
1817 .platform = "ppc440",
1818 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001819 { /* 476 DD2 core */
1820 .pvr_mask = 0xffffffff,
1821 .pvr_value = 0x11a52080,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001822 .cpu_name = "476",
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001823 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001824 .cpu_user_features = COMMON_USER_BOOKE |
1825 PPC_FEATURE_HAS_FPU,
1826 .mmu_features = MMU_FTR_TYPE_47x |
1827 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1828 .icache_bsize = 32,
1829 .dcache_bsize = 128,
Dave Kleikampfc5e7092010-03-05 03:43:18 +00001830 .machine_check = machine_check_47x,
Dave Kleikampe7f75ad2010-03-05 10:43:12 +00001831 .platform = "ppc470",
1832 },
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001833 { /* 476 iss */
1834 .pvr_mask = 0xffff0000,
1835 .pvr_value = 0x00050000,
1836 .cpu_name = "476",
1837 .cpu_features = CPU_FTRS_47X,
1838 .cpu_user_features = COMMON_USER_BOOKE |
1839 PPC_FEATURE_HAS_FPU,
Torez Smithb4e8c8d2010-03-05 10:45:54 +00001840 .mmu_features = MMU_FTR_TYPE_47x |
1841 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1842 .icache_bsize = 32,
1843 .dcache_bsize = 128,
1844 .machine_check = machine_check_47x,
1845 .platform = "ppc470",
1846 },
Dave Kleikampc48d0db2011-01-26 06:17:58 +00001847 { /* 476 others */
1848 .pvr_mask = 0xffff0000,
1849 .pvr_value = 0x11a50000,
1850 .cpu_name = "476",
1851 .cpu_features = CPU_FTRS_47X,
1852 .cpu_user_features = COMMON_USER_BOOKE |
1853 PPC_FEATURE_HAS_FPU,
1854 .mmu_features = MMU_FTR_TYPE_47x |
1855 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1856 .icache_bsize = 32,
1857 .dcache_bsize = 128,
1858 .machine_check = machine_check_47x,
1859 .platform = "ppc470",
1860 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001861 { /* default match */
1862 .pvr_mask = 0x00000000,
1863 .pvr_value = 0x00000000,
1864 .cpu_name = "(generic 44x PPC)",
1865 .cpu_features = CPU_FTRS_44X,
1866 .cpu_user_features = COMMON_USER_BOOKE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001867 .mmu_features = MMU_FTR_TYPE_44x,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001868 .icache_bsize = 32,
1869 .dcache_bsize = 32,
1870 .machine_check = machine_check_4xx,
1871 .platform = "ppc440",
1872 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001873#endif /* CONFIG_44x */
Josh Boyere3e414b2007-12-24 08:44:47 -06001874#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001875 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001876 .pvr_mask = 0xfff00000,
1877 .pvr_value = 0x81000000,
1878 .cpu_name = "e200z5",
1879 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001880 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001881 .cpu_user_features = COMMON_USER_BOOKE |
1882 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001883 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001884 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001885 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001886 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001887 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001888 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001889 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001890 .pvr_mask = 0xfff00000,
1891 .pvr_value = 0x81100000,
1892 .cpu_name = "e200z6",
1893 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001894 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001895 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001896 PPC_FEATURE_HAS_SPE_COMP |
1897 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001898 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001899 .mmu_features = MMU_FTR_TYPE_FSL_E,
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001900 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001901 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001902 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001903 },
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001904 { /* default match */
1905 .pvr_mask = 0x00000000,
1906 .pvr_value = 0x00000000,
1907 .cpu_name = "(generic E200 PPC)",
1908 .cpu_features = CPU_FTRS_E200,
1909 .cpu_user_features = COMMON_USER_BOOKE |
1910 PPC_FEATURE_HAS_EFP_SINGLE |
1911 PPC_FEATURE_UNIFIED_CACHE,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001912 .mmu_features = MMU_FTR_TYPE_FSL_E,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001913 .dcache_bsize = 32,
Kumar Gala105c31d2009-01-08 08:31:20 -06001914 .cpu_setup = __setup_cpu_e200,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001915 .machine_check = machine_check_e200,
1916 .platform = "ppc5554",
Paul Mackerras516c8be2008-05-12 14:20:35 +10001917 }
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001918#endif /* CONFIG_E200 */
Kumar Gala4490c062010-10-08 08:32:11 -05001919#endif /* CONFIG_PPC32 */
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001920#ifdef CONFIG_E500
Kumar Gala4490c062010-10-08 08:32:11 -05001921#ifdef CONFIG_PPC32
Stephen Rothwell49209602005-10-12 15:55:09 +10001922 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001923 .pvr_mask = 0xffff0000,
1924 .pvr_value = 0x80200000,
1925 .cpu_name = "e500",
Kumar Gala10b35d92005-09-23 14:08:58 -05001926 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001927 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001928 PPC_FEATURE_HAS_SPE_COMP |
1929 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001930 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001931 .icache_bsize = 32,
1932 .dcache_bsize = 32,
1933 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001934 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001935 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001936 .cpu_setup = __setup_cpu_e500v1,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001937 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001938 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001939 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001940 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001941 .pvr_mask = 0xffff0000,
1942 .pvr_value = 0x80210000,
1943 .cpu_name = "e500v2",
Kumar Gala10b35d92005-09-23 14:08:58 -05001944 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001945 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001946 PPC_FEATURE_HAS_SPE_COMP |
1947 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1948 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00001949 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
Kumar Gala5b37b702005-06-21 17:15:18 -07001950 .icache_bsize = 32,
1951 .dcache_bsize = 32,
1952 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001953 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001954 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001955 .cpu_setup = __setup_cpu_e500v2,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001956 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001957 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001958 },
Kumar Gala3dfa8772008-06-16 09:41:32 -05001959 { /* e500mc */
1960 .pvr_mask = 0xffff0000,
1961 .pvr_value = 0x80230000,
1962 .cpu_name = "e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001963 .cpu_features = CPU_FTRS_E500MC,
1964 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Galac3071952009-02-10 22:26:06 -06001965 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
Kumar Gala323d23a2009-04-23 08:51:22 -05001966 MMU_FTR_USE_TLBILX,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001967 .icache_bsize = 64,
1968 .dcache_bsize = 64,
1969 .num_pmcs = 4,
Scott Wooda11106542010-02-25 18:09:45 -06001970 .oprofile_cpu_type = "ppc/e500mc",
Kumar Gala3dfa8772008-06-16 09:41:32 -05001971 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Kumar Gala105c31d2009-01-08 08:31:20 -06001972 .cpu_setup = __setup_cpu_e500mc,
Scott Woodfe04b112010-04-08 00:38:22 -05001973 .machine_check = machine_check_e500mc,
Kumar Gala3dfa8772008-06-16 09:41:32 -05001974 .platform = "ppce500mc",
1975 },
Kumar Gala4490c062010-10-08 08:32:11 -05001976#endif /* CONFIG_PPC32 */
1977 { /* e5500 */
1978 .pvr_mask = 0xffff0000,
1979 .pvr_value = 0x80240000,
1980 .cpu_name = "e5500",
Kumar Gala11ed0db2011-04-06 00:11:06 -05001981 .cpu_features = CPU_FTRS_E5500,
Kumar Galafb9be232011-06-02 11:26:13 -05001982 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Kumar Gala4490c062010-10-08 08:32:11 -05001983 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
1984 MMU_FTR_USE_TLBILX,
1985 .icache_bsize = 64,
1986 .dcache_bsize = 64,
1987 .num_pmcs = 4,
1988 .oprofile_cpu_type = "ppc/e500mc",
1989 .oprofile_type = PPC_OPROFILE_FSL_EMB,
1990 .cpu_setup = __setup_cpu_e5500,
1991 .cpu_restore = __restore_cpu_e5500,
1992 .machine_check = machine_check_e500mc,
1993 .platform = "ppce5500",
1994 },
1995#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -07001996 { /* default match */
1997 .pvr_mask = 0x00000000,
1998 .pvr_value = 0x00000000,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10001999 .cpu_name = "(generic E500 PPC)",
2000 .cpu_features = CPU_FTRS_E500,
2001 .cpu_user_features = COMMON_USER_BOOKE |
2002 PPC_FEATURE_HAS_SPE_COMP |
2003 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Benjamin Herrenschmidt7c03d652008-12-18 19:13:32 +00002004 .mmu_features = MMU_FTR_TYPE_FSL_E,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002005 .icache_bsize = 32,
2006 .dcache_bsize = 32,
Benjamin Herrenschmidt76bc080e2008-05-05 15:22:27 +10002007 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11002008 .platform = "powerpc",
Paul Mackerras516c8be2008-05-12 14:20:35 +10002009 }
Stephen Rothwell49209602005-10-12 15:55:09 +10002010#endif /* CONFIG_PPC32 */
Kumar Gala4490c062010-10-08 08:32:11 -05002011#endif /* CONFIG_E500 */
Kumar Galaf45c4482009-08-18 19:08:30 +00002012
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002013#ifdef CONFIG_PPC_A2
2014 { /* Standard A2 (>= DD2) + FPU core */
2015 .pvr_mask = 0xffff0000,
2016 .pvr_value = 0x00480000,
2017 .cpu_name = "A2 (>= DD2)",
2018 .cpu_features = CPU_FTRS_A2,
2019 .cpu_user_features = COMMON_USER_PPC64,
Matt Evans44ae3ab2011-04-06 19:48:50 +00002020 .mmu_features = MMU_FTRS_A2,
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002021 .icache_bsize = 64,
2022 .dcache_bsize = 64,
2023 .num_pmcs = 0,
2024 .cpu_setup = __setup_cpu_a2,
2025 .cpu_restore = __restore_cpu_a2,
2026 .machine_check = machine_check_generic,
2027 .platform = "ppca2",
2028 },
Kumar Galaf45c4482009-08-18 19:08:30 +00002029 { /* This is a default entry to get going, to be replaced by
2030 * a real one at some stage
2031 */
2032#define CPU_FTRS_BASE_BOOK3E (CPU_FTR_USE_TB | \
2033 CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
2034 CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
2035 .pvr_mask = 0x00000000,
2036 .pvr_value = 0x00000000,
2037 .cpu_name = "Book3E",
2038 .cpu_features = CPU_FTRS_BASE_BOOK3E,
2039 .cpu_user_features = COMMON_USER_PPC64,
2040 .mmu_features = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
2041 MMU_FTR_USE_TLBIVAX_BCAST |
2042 MMU_FTR_LOCK_BCAST_INVAL,
2043 .icache_bsize = 64,
2044 .dcache_bsize = 64,
2045 .num_pmcs = 0,
2046 .machine_check = machine_check_generic,
2047 .platform = "power6",
2048 },
Benjamin Herrenschmidt76b4eda2011-04-14 22:32:01 +00002049#endif /* CONFIG_PPC_A2 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002050};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002051
Paul Mackerras87a72f92007-10-04 14:18:01 +10002052static struct cpu_spec the_cpu_spec;
2053
Scott Wood26ee9762011-07-25 11:04:36 +00002054static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2055 struct cpu_spec *s)
Michael Ellerman666435b2009-02-22 16:25:43 +00002056{
2057 struct cpu_spec *t = &the_cpu_spec;
Michael Ellerman2657dd42009-02-22 16:25:45 +00002058 struct cpu_spec old;
2059
Michael Ellerman666435b2009-02-22 16:25:43 +00002060 t = PTRRELOC(t);
Michael Ellerman2657dd42009-02-22 16:25:45 +00002061 old = *t;
2062
2063 /* Copy everything, then do fixups */
2064 *t = *s;
Michael Ellerman666435b2009-02-22 16:25:43 +00002065
2066 /*
2067 * If we are overriding a previous value derived from the real
2068 * PVR with a new value obtained using a logical PVR value,
2069 * don't modify the performance monitor fields.
2070 */
Michael Ellerman2657dd42009-02-22 16:25:45 +00002071 if (old.num_pmcs && !s->num_pmcs) {
2072 t->num_pmcs = old.num_pmcs;
2073 t->pmc_type = old.pmc_type;
2074 t->oprofile_type = old.oprofile_type;
2075 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2076 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2077 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2078
Michael Ellerman666435b2009-02-22 16:25:43 +00002079 /*
2080 * If we have passed through this logic once before and
2081 * have pulled the default case because the real PVR was
2082 * not found inside cpu_specs[], then we are possibly
2083 * running in compatibility mode. In that case, let the
2084 * oprofiler know which set of compatibility counters to
2085 * pull from by making sure the oprofile_cpu_type string
2086 * is set to that of compatibility mode. If the
2087 * oprofile_cpu_type already has a value, then we are
2088 * possibly overriding a real PVR with a logical one,
2089 * and, in that case, keep the current value for
2090 * oprofile_cpu_type.
2091 */
Benjamin Herrenschmidtb173f032009-05-14 18:34:06 +00002092 if (old.oprofile_cpu_type != NULL) {
Benjamin Herrenschmidt0203d6e2009-04-29 19:39:38 +00002093 t->oprofile_cpu_type = old.oprofile_cpu_type;
2094 t->oprofile_type = old.oprofile_type;
Michael Wolf79af6c42009-04-27 06:17:54 +00002095 }
Michael Ellerman2657dd42009-02-22 16:25:45 +00002096 }
Michael Ellerman666435b2009-02-22 16:25:43 +00002097
2098 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
2099
2100 /*
2101 * Set the base platform string once; assumes
2102 * we're called with real pvr first.
2103 */
2104 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2105 *PTRRELOC(&powerpc_base_platform) = t->platform;
2106
2107#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
2108 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2109 * that processor. I will consolidate that at a later time, for now,
2110 * just use #ifdef. We also don't need to PTRRELOC the function
2111 * pointer on ppc64 and booke as we are running at 0 in real mode
2112 * on ppc64 and reloc_offset is always 0 on booke.
2113 */
Benjamin Herrenschmidtaf9eef32011-01-20 20:36:03 +00002114 if (t->cpu_setup) {
2115 t->cpu_setup(offset, t);
Michael Ellerman666435b2009-02-22 16:25:43 +00002116 }
2117#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Scott Wood26ee9762011-07-25 11:04:36 +00002118
2119 return t;
Michael Ellerman666435b2009-02-22 16:25:43 +00002120}
2121
Paul Mackerras87a72f92007-10-04 14:18:01 +10002122struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002123{
2124 struct cpu_spec *s = cpu_specs;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002125 int i;
2126
2127 s = PTRRELOC(s);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002128
Michael Ellerman666435b2009-02-22 16:25:43 +00002129 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
Scott Wood26ee9762011-07-25 11:04:36 +00002130 if ((pvr & s->pvr_mask) == s->pvr_value)
2131 return setup_cpu_spec(offset, s);
Michael Ellerman666435b2009-02-22 16:25:43 +00002132 }
2133
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002134 BUG();
Michael Ellerman666435b2009-02-22 16:25:43 +00002135
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10002136 return NULL;
2137}