diff options
Diffstat (limited to 'arch/mips/include/asm/octeon/octeon-model.h')
-rw-r--r-- | arch/mips/include/asm/octeon/octeon-model.h | 240 |
1 files changed, 120 insertions, 120 deletions
diff --git a/arch/mips/include/asm/octeon/octeon-model.h b/arch/mips/include/asm/octeon/octeon-model.h index 349bb2ba840c..e2c122c6a657 100644 --- a/arch/mips/include/asm/octeon/octeon-model.h +++ b/arch/mips/include/asm/octeon/octeon-model.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The defines below should be used with the OCTEON_IS_MODEL() macro | 31 | * The defines below should be used with the OCTEON_IS_MODEL() macro |
32 | * to determine what model of chip the software is running on. Models | 32 | * to determine what model of chip the software is running on. Models |
33 | * ending in 'XX' match multiple models (families), while specific | 33 | * ending in 'XX' match multiple models (families), while specific |
34 | * models match only that model. If a pass (revision) is specified, | 34 | * models match only that model. If a pass (revision) is specified, |
35 | * then only that revision will be matched. Care should be taken when | 35 | * then only that revision will be matched. Care should be taken when |
@@ -40,183 +40,183 @@ | |||
40 | * subject to change at anytime without notice. | 40 | * subject to change at anytime without notice. |
41 | * | 41 | * |
42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* | 42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* |
43 | * macros should be used outside of this file. All other macros are | 43 | * macros should be used outside of this file. All other macros are |
44 | * for internal use only, and may change without notice. | 44 | * for internal use only, and may change without notice. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define OCTEON_FAMILY_MASK 0x00ffff00 | 47 | #define OCTEON_FAMILY_MASK 0x00ffff00 |
48 | 48 | ||
49 | /* Flag bits in top byte */ | 49 | /* Flag bits in top byte */ |
50 | /* Ignores revision in model checks */ | 50 | /* Ignores revision in model checks */ |
51 | #define OM_IGNORE_REVISION 0x01000000 | 51 | #define OM_IGNORE_REVISION 0x01000000 |
52 | /* Check submodels */ | 52 | /* Check submodels */ |
53 | #define OM_CHECK_SUBMODEL 0x02000000 | 53 | #define OM_CHECK_SUBMODEL 0x02000000 |
54 | /* Match all models previous than the one specified */ | 54 | /* Match all models previous than the one specified */ |
55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 | 55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 |
56 | /* Ignores the minor revison on newer parts */ | 56 | /* Ignores the minor revison on newer parts */ |
57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 | 57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 |
58 | #define OM_FLAG_MASK 0xff000000 | 58 | #define OM_FLAG_MASK 0xff000000 |
59 | 59 | ||
60 | /* Match all cn5XXX Octeon models. */ | 60 | /* Match all cn5XXX Octeon models. */ |
61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 | 61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 |
62 | /* Match all cn6XXX Octeon models. */ | 62 | /* Match all cn6XXX Octeon models. */ |
63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 | 63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 |
64 | /* Match all cnf7XXX Octeon models. */ | 64 | /* Match all cnf7XXX Octeon models. */ |
65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 | 65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * CNF7XXX models with new revision encoding | 68 | * CNF7XXX models with new revision encoding |
69 | */ | 69 | */ |
70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 | 70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 |
71 | 71 | ||
72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) | 72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) |
73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * CN6XXX models with new revision encoding | 76 | * CN6XXX models with new revision encoding |
77 | */ | 77 | */ |
78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 | 78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 |
79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 | 79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 |
80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 | 80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 |
81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 | 81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 |
82 | 82 | ||
83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) | 83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) |
84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
86 | 86 | ||
87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X | 87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X |
88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X | 88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X |
89 | 89 | ||
90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 | 90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 |
91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 | 91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 |
92 | 92 | ||
93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) | 93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) |
94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
95 | 95 | ||
96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 | 96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 |
97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 | 97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 |
98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 | 98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 |
99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 | 99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 |
100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 | 100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 |
101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a | 101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a |
102 | 102 | ||
103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) | 103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) |
104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
106 | 106 | ||
107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 | 107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 |
108 | 108 | ||
109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) | 109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) |
110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * CN5XXX models with new revision encoding | 113 | * CN5XXX models with new revision encoding |
114 | */ | 114 | */ |
115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 | 115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 |
116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 | 116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 |
117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 | 117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 |
118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 | 118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 |
119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 | 119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 |
120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a | 120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a |
121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b | 121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b |
122 | 122 | ||
123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) | 123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) |
124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X | 126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X |
127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X | 127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X |
128 | 128 | ||
129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 | 129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 |
130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 | 130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 |
131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 | 131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 |
132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 | 132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 |
133 | 133 | ||
134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) | 134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) |
135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X | 137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X |
138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X | 138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X |
139 | 139 | ||
140 | #define OCTEON_CN57XX OCTEON_CN56XX | 140 | #define OCTEON_CN57XX OCTEON_CN56XX |
141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 | 141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 |
142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 | 142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 |
143 | 143 | ||
144 | #define OCTEON_CN55XX OCTEON_CN56XX | 144 | #define OCTEON_CN55XX OCTEON_CN56XX |
145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 | 145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 |
146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 | 146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 |
147 | 147 | ||
148 | #define OCTEON_CN54XX OCTEON_CN56XX | 148 | #define OCTEON_CN54XX OCTEON_CN56XX |
149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 | 149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 |
150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 | 150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 |
151 | 151 | ||
152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 | 152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 |
153 | 153 | ||
154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) | 154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) |
155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X | 156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * NOTE: Octeon CN5000F model is not identifiable using the | 159 | * NOTE: Octeon CN5000F model is not identifiable using the |
160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. | 160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 | 163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 |
164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 | 164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 |
165 | 165 | ||
166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) | 166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) |
167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X | 169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X |
170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X | 170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * CN3XXX models with old revision enconding | 173 | * CN3XXX models with old revision enconding |
174 | */ | 174 | */ |
175 | #define OCTEON_CN38XX_PASS1 0x000d0000 | 175 | #define OCTEON_CN38XX_PASS1 0x000d0000 |
176 | #define OCTEON_CN38XX_PASS2 0x000d0001 | 176 | #define OCTEON_CN38XX_PASS2 0x000d0001 |
177 | #define OCTEON_CN38XX_PASS3 0x000d0003 | 177 | #define OCTEON_CN38XX_PASS3 0x000d0003 |
178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) | 178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) |
179 | 179 | ||
180 | #define OCTEON_CN36XX OCTEON_CN38XX | 180 | #define OCTEON_CN36XX OCTEON_CN38XX |
181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 | 181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 |
182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 | 182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 |
183 | 183 | ||
184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ | 184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ |
185 | #define OCTEON_CN31XX_PASS1 0x000d0100 | 185 | #define OCTEON_CN31XX_PASS1 0x000d0100 |
186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 | 186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 |
187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) | 187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * This model is only used for internal checks, it is not a valid | 190 | * This model is only used for internal checks, it is not a valid |
191 | * model for the OCTEON_MODEL environment variable. This matches the | 191 | * model for the OCTEON_MODEL environment variable. This matches the |
192 | * CN3010 and CN3005 but NOT the CN3020. | 192 | * CN3010 and CN3005 but NOT the CN3020. |
193 | */ | 193 | */ |
194 | #define OCTEON_CN30XX_PASS1 0x000d0200 | 194 | #define OCTEON_CN30XX_PASS1 0x000d0200 |
195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 | 195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 |
196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) | 196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) |
197 | 197 | ||
198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) | 198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) |
199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) | 199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) |
200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) | 200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) |
201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
202 | 202 | ||
203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) | 203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) |
204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) | 204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) |
205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) | 205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) |
206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
207 | 207 | ||
208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) | 208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) |
209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) | 209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) |
210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) | 210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) |
211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * This matches the complete family of CN3xxx CPUs, and not subsequent | 214 | * This matches the complete family of CN3xxx CPUs, and not subsequent |
215 | * models | 215 | * models |
216 | */ | 216 | */ |
217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) | 217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) |
218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) | 218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) |
219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) | 219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) |
220 | 220 | ||
221 | /* These are used to cover entire families of OCTEON processors */ | 221 | /* These are used to cover entire families of OCTEON processors */ |
222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) | 222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) |
@@ -243,18 +243,18 @@ | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | /* Masks used for the various types of model/family/revision matching */ | 245 | /* Masks used for the various types of model/family/revision matching */ |
246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 | 246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 |
247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f | 247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f |
248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 | 248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 |
249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) | 249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) |
250 | 250 | ||
251 | /* CN5XXX and later use different layout of bits in the revision ID field */ | 251 | /* CN5XXX and later use different layout of bits in the revision ID field */ |
252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK | 252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK |
253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f | 253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f |
254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 | 254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 |
255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) | 255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) |
256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) | 256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) |
257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 | 257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 |
258 | 258 | ||
259 | /* forward declarations */ | 259 | /* forward declarations */ |
260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); | 260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); |
@@ -264,7 +264,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
264 | 264 | ||
265 | /* NOTE: This for internal use only! */ | 265 | /* NOTE: This for internal use only! */ |
266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ | 266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ |
267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ | 267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ |
268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ | 269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ |
270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -276,7 +276,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ | 276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ |
277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ | 277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ |
278 | )) || \ | 278 | )) || \ |
279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ | 279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ |
280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ | 281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ |
282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -320,7 +320,7 @@ static inline int __octeon_is_model_runtime__(uint32_t model) | |||
320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) | 320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) |
321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() | 321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() |
322 | * I.e.: | 322 | * I.e.: |
323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) | 323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) |
324 | */ | 324 | */ |
325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) | 325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) |
326 | #define OCTEON_IS_COMMON_BINARY() 1 | 326 | #define OCTEON_IS_COMMON_BINARY() 1 |