diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/cpu.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 92 |
1 files changed, 16 insertions, 76 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index a162f585b1e3..ed8786c41df2 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define __ASM_ARCH_OMAP_CPU_H | 31 | #define __ASM_ARCH_OMAP_CPU_H |
32 | 32 | ||
33 | #include <linux/bitops.h> | 33 | #include <linux/bitops.h> |
34 | #include <plat/multi.h> | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Omap device type i.e. EMU/HS/TST/GP/BAD | 37 | * Omap device type i.e. EMU/HS/TST/GP/BAD |
@@ -44,7 +45,7 @@ | |||
44 | int omap_type(void); | 45 | int omap_type(void); |
45 | 46 | ||
46 | struct omap_chip_id { | 47 | struct omap_chip_id { |
47 | u8 oc; | 48 | u16 oc; |
48 | u8 type; | 49 | u8 type; |
49 | }; | 50 | }; |
50 | 51 | ||
@@ -76,75 +77,6 @@ unsigned int omap_rev(void); | |||
76 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | 77 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) |
77 | 78 | ||
78 | /* | 79 | /* |
79 | * Test if multicore OMAP support is needed | ||
80 | */ | ||
81 | #undef MULTI_OMAP1 | ||
82 | #undef MULTI_OMAP2 | ||
83 | #undef OMAP_NAME | ||
84 | |||
85 | #ifdef CONFIG_ARCH_OMAP730 | ||
86 | # ifdef OMAP_NAME | ||
87 | # undef MULTI_OMAP1 | ||
88 | # define MULTI_OMAP1 | ||
89 | # else | ||
90 | # define OMAP_NAME omap730 | ||
91 | # endif | ||
92 | #endif | ||
93 | #ifdef CONFIG_ARCH_OMAP850 | ||
94 | # ifdef OMAP_NAME | ||
95 | # undef MULTI_OMAP1 | ||
96 | # define MULTI_OMAP1 | ||
97 | # else | ||
98 | # define OMAP_NAME omap850 | ||
99 | # endif | ||
100 | #endif | ||
101 | #ifdef CONFIG_ARCH_OMAP15XX | ||
102 | # ifdef OMAP_NAME | ||
103 | # undef MULTI_OMAP1 | ||
104 | # define MULTI_OMAP1 | ||
105 | # else | ||
106 | # define OMAP_NAME omap1510 | ||
107 | # endif | ||
108 | #endif | ||
109 | #ifdef CONFIG_ARCH_OMAP16XX | ||
110 | # ifdef OMAP_NAME | ||
111 | # undef MULTI_OMAP1 | ||
112 | # define MULTI_OMAP1 | ||
113 | # else | ||
114 | # define OMAP_NAME omap16xx | ||
115 | # endif | ||
116 | #endif | ||
117 | #if (defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)) | ||
118 | # if (defined(OMAP_NAME) || defined(MULTI_OMAP1)) | ||
119 | # error "OMAP1 and OMAP2 can't be selected at the same time" | ||
120 | # endif | ||
121 | #endif | ||
122 | #ifdef CONFIG_ARCH_OMAP2420 | ||
123 | # ifdef OMAP_NAME | ||
124 | # undef MULTI_OMAP2 | ||
125 | # define MULTI_OMAP2 | ||
126 | # else | ||
127 | # define OMAP_NAME omap2420 | ||
128 | # endif | ||
129 | #endif | ||
130 | #ifdef CONFIG_ARCH_OMAP2430 | ||
131 | # ifdef OMAP_NAME | ||
132 | # undef MULTI_OMAP2 | ||
133 | # define MULTI_OMAP2 | ||
134 | # else | ||
135 | # define OMAP_NAME omap2430 | ||
136 | # endif | ||
137 | #endif | ||
138 | #ifdef CONFIG_ARCH_OMAP3430 | ||
139 | # ifdef OMAP_NAME | ||
140 | # undef MULTI_OMAP2 | ||
141 | # define MULTI_OMAP2 | ||
142 | # else | ||
143 | # define OMAP_NAME omap3430 | ||
144 | # endif | ||
145 | #endif | ||
146 | |||
147 | /* | ||
148 | * Macros to group OMAP into cpu classes. | 80 | * Macros to group OMAP into cpu classes. |
149 | * These can be used in most places. | 81 | * These can be used in most places. |
150 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | 82 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 |
@@ -154,6 +86,7 @@ unsigned int omap_rev(void); | |||
154 | * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423 | 86 | * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423 |
155 | * cpu_is_omap243x(): True for OMAP2430 | 87 | * cpu_is_omap243x(): True for OMAP2430 |
156 | * cpu_is_omap343x(): True for OMAP3430 | 88 | * cpu_is_omap343x(): True for OMAP3430 |
89 | * cpu_is_omap443x(): True for OMAP4430 | ||
157 | */ | 90 | */ |
158 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | 91 | #define GET_OMAP_CLASS (omap_rev() & 0xff) |
159 | 92 | ||
@@ -232,7 +165,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
232 | #endif | 165 | #endif |
233 | 166 | ||
234 | #if defined(MULTI_OMAP2) | 167 | #if defined(MULTI_OMAP2) |
235 | # if defined(CONFIG_ARCH_OMAP24XX) | 168 | # if defined(CONFIG_ARCH_OMAP2) |
236 | # undef cpu_is_omap24xx | 169 | # undef cpu_is_omap24xx |
237 | # undef cpu_is_omap242x | 170 | # undef cpu_is_omap242x |
238 | # undef cpu_is_omap243x | 171 | # undef cpu_is_omap243x |
@@ -240,14 +173,14 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
240 | # define cpu_is_omap242x() is_omap242x() | 173 | # define cpu_is_omap242x() is_omap242x() |
241 | # define cpu_is_omap243x() is_omap243x() | 174 | # define cpu_is_omap243x() is_omap243x() |
242 | # endif | 175 | # endif |
243 | # if defined(CONFIG_ARCH_OMAP34XX) | 176 | # if defined(CONFIG_ARCH_OMAP3) |
244 | # undef cpu_is_omap34xx | 177 | # undef cpu_is_omap34xx |
245 | # undef cpu_is_omap343x | 178 | # undef cpu_is_omap343x |
246 | # define cpu_is_omap34xx() is_omap34xx() | 179 | # define cpu_is_omap34xx() is_omap34xx() |
247 | # define cpu_is_omap343x() is_omap343x() | 180 | # define cpu_is_omap343x() is_omap343x() |
248 | # endif | 181 | # endif |
249 | #else | 182 | #else |
250 | # if defined(CONFIG_ARCH_OMAP24XX) | 183 | # if defined(CONFIG_ARCH_OMAP2) |
251 | # undef cpu_is_omap24xx | 184 | # undef cpu_is_omap24xx |
252 | # define cpu_is_omap24xx() 1 | 185 | # define cpu_is_omap24xx() 1 |
253 | # endif | 186 | # endif |
@@ -259,7 +192,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
259 | # undef cpu_is_omap243x | 192 | # undef cpu_is_omap243x |
260 | # define cpu_is_omap243x() 1 | 193 | # define cpu_is_omap243x() 1 |
261 | # endif | 194 | # endif |
262 | # if defined(CONFIG_ARCH_OMAP34XX) | 195 | # if defined(CONFIG_ARCH_OMAP3) |
263 | # undef cpu_is_omap34xx | 196 | # undef cpu_is_omap34xx |
264 | # define cpu_is_omap34xx() 1 | 197 | # define cpu_is_omap34xx() 1 |
265 | # endif | 198 | # endif |
@@ -286,6 +219,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
286 | * cpu_is_omap2423(): True for OMAP2423 | 219 | * cpu_is_omap2423(): True for OMAP2423 |
287 | * cpu_is_omap2430(): True for OMAP2430 | 220 | * cpu_is_omap2430(): True for OMAP2430 |
288 | * cpu_is_omap3430(): True for OMAP3430 | 221 | * cpu_is_omap3430(): True for OMAP3430 |
222 | * cpu_is_omap4430(): True for OMAP4430 | ||
289 | * cpu_is_omap3505(): True for OMAP3505 | 223 | * cpu_is_omap3505(): True for OMAP3505 |
290 | * cpu_is_omap3517(): True for OMAP3517 | 224 | * cpu_is_omap3517(): True for OMAP3517 |
291 | */ | 225 | */ |
@@ -334,6 +268,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
334 | #define cpu_is_omap3505() 0 | 268 | #define cpu_is_omap3505() 0 |
335 | #define cpu_is_omap3517() 0 | 269 | #define cpu_is_omap3517() 0 |
336 | #define cpu_is_omap3430() 0 | 270 | #define cpu_is_omap3430() 0 |
271 | #define cpu_is_omap4430() 0 | ||
337 | #define cpu_is_omap3630() 0 | 272 | #define cpu_is_omap3630() 0 |
338 | 273 | ||
339 | /* | 274 | /* |
@@ -371,7 +306,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
371 | # define cpu_is_omap1710() is_omap1710() | 306 | # define cpu_is_omap1710() is_omap1710() |
372 | #endif | 307 | #endif |
373 | 308 | ||
374 | #if defined(CONFIG_ARCH_OMAP24XX) | 309 | #if defined(CONFIG_ARCH_OMAP2) |
375 | # undef cpu_is_omap2420 | 310 | # undef cpu_is_omap2420 |
376 | # undef cpu_is_omap2422 | 311 | # undef cpu_is_omap2422 |
377 | # undef cpu_is_omap2423 | 312 | # undef cpu_is_omap2423 |
@@ -382,7 +317,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
382 | # define cpu_is_omap2430() is_omap2430() | 317 | # define cpu_is_omap2430() is_omap2430() |
383 | #endif | 318 | #endif |
384 | 319 | ||
385 | #if defined(CONFIG_ARCH_OMAP34XX) | 320 | #if defined(CONFIG_ARCH_OMAP3) |
386 | # undef cpu_is_omap3430 | 321 | # undef cpu_is_omap3430 |
387 | # undef cpu_is_omap3503 | 322 | # undef cpu_is_omap3503 |
388 | # undef cpu_is_omap3515 | 323 | # undef cpu_is_omap3515 |
@@ -471,9 +406,12 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
471 | #define CHIP_IS_OMAP3430ES3_0 (1 << 5) | 406 | #define CHIP_IS_OMAP3430ES3_0 (1 << 5) |
472 | #define CHIP_IS_OMAP3430ES3_1 (1 << 6) | 407 | #define CHIP_IS_OMAP3430ES3_1 (1 << 6) |
473 | #define CHIP_IS_OMAP3630ES1 (1 << 7) | 408 | #define CHIP_IS_OMAP3630ES1 (1 << 7) |
409 | #define CHIP_IS_OMAP4430ES1 (1 << 8) | ||
474 | 410 | ||
475 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 411 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
476 | 412 | ||
413 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1) | ||
414 | |||
477 | /* | 415 | /* |
478 | * "GE" here represents "greater than or equal to" in terms of ES | 416 | * "GE" here represents "greater than or equal to" in terms of ES |
479 | * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430 | 417 | * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430 |
@@ -501,6 +439,7 @@ extern u32 omap3_features; | |||
501 | #define OMAP3_HAS_SGX BIT(2) | 439 | #define OMAP3_HAS_SGX BIT(2) |
502 | #define OMAP3_HAS_NEON BIT(3) | 440 | #define OMAP3_HAS_NEON BIT(3) |
503 | #define OMAP3_HAS_ISP BIT(4) | 441 | #define OMAP3_HAS_ISP BIT(4) |
442 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | ||
504 | 443 | ||
505 | #define OMAP3_HAS_FEATURE(feat,flag) \ | 444 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
506 | static inline unsigned int omap3_has_ ##feat(void) \ | 445 | static inline unsigned int omap3_has_ ##feat(void) \ |
@@ -513,5 +452,6 @@ OMAP3_HAS_FEATURE(sgx, SGX) | |||
513 | OMAP3_HAS_FEATURE(iva, IVA) | 452 | OMAP3_HAS_FEATURE(iva, IVA) |
514 | OMAP3_HAS_FEATURE(neon, NEON) | 453 | OMAP3_HAS_FEATURE(neon, NEON) |
515 | OMAP3_HAS_FEATURE(isp, ISP) | 454 | OMAP3_HAS_FEATURE(isp, ISP) |
455 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | ||
516 | 456 | ||
517 | #endif | 457 | #endif |