bfd9c5f5ee1485b1f4f2c6f98e507fbd79b5d29d
[deliverable/linux.git] / arch / arm / plat-omap / include / plat / cpu.h
1 /*
2 * arch/arm/plat-omap/include/mach/cpu.h
3 *
4 * OMAP cpu type detection
5 *
6 * Copyright (C) 2004, 2008 Nokia Corporation
7 *
8 * Copyright (C) 2009-11 Texas Instruments.
9 *
10 * Written by Tony Lindgren <tony.lindgren@nokia.com>
11 *
12 * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 *
28 */
29
30 #ifndef __ASM_ARCH_OMAP_CPU_H
31 #define __ASM_ARCH_OMAP_CPU_H
32
33 #ifndef __ASSEMBLY__
34
35 #include <linux/bitops.h>
36
37 /*
38 * Test if multicore OMAP support is needed
39 */
40 #undef MULTI_OMAP1
41 #undef MULTI_OMAP2
42 #undef OMAP_NAME
43
44 #ifdef CONFIG_ARCH_OMAP730
45 # ifdef OMAP_NAME
46 # undef MULTI_OMAP1
47 # define MULTI_OMAP1
48 # else
49 # define OMAP_NAME omap730
50 # endif
51 #endif
52 #ifdef CONFIG_ARCH_OMAP850
53 # ifdef OMAP_NAME
54 # undef MULTI_OMAP1
55 # define MULTI_OMAP1
56 # else
57 # define OMAP_NAME omap850
58 # endif
59 #endif
60 #ifdef CONFIG_ARCH_OMAP15XX
61 # ifdef OMAP_NAME
62 # undef MULTI_OMAP1
63 # define MULTI_OMAP1
64 # else
65 # define OMAP_NAME omap1510
66 # endif
67 #endif
68 #ifdef CONFIG_ARCH_OMAP16XX
69 # ifdef OMAP_NAME
70 # undef MULTI_OMAP1
71 # define MULTI_OMAP1
72 # else
73 # define OMAP_NAME omap16xx
74 # endif
75 #endif
76 #ifdef CONFIG_ARCH_OMAP2PLUS
77 # if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
78 # error "OMAP1 and OMAP2PLUS can't be selected at the same time"
79 # endif
80 #endif
81 #ifdef CONFIG_SOC_OMAP2420
82 # ifdef OMAP_NAME
83 # undef MULTI_OMAP2
84 # define MULTI_OMAP2
85 # else
86 # define OMAP_NAME omap2420
87 # endif
88 #endif
89 #ifdef CONFIG_SOC_OMAP2430
90 # ifdef OMAP_NAME
91 # undef MULTI_OMAP2
92 # define MULTI_OMAP2
93 # else
94 # define OMAP_NAME omap2430
95 # endif
96 #endif
97 #ifdef CONFIG_ARCH_OMAP3
98 # ifdef OMAP_NAME
99 # undef MULTI_OMAP2
100 # define MULTI_OMAP2
101 # else
102 # define OMAP_NAME omap3
103 # endif
104 #endif
105 #ifdef CONFIG_ARCH_OMAP4
106 # ifdef OMAP_NAME
107 # undef MULTI_OMAP2
108 # define MULTI_OMAP2
109 # else
110 # define OMAP_NAME omap4
111 # endif
112 #endif
113
114 #ifdef CONFIG_SOC_OMAP5
115 # ifdef OMAP_NAME
116 # undef MULTI_OMAP2
117 # define MULTI_OMAP2
118 # else
119 # define OMAP_NAME omap5
120 # endif
121 #endif
122
123 #ifdef CONFIG_SOC_AM33XX
124 # ifdef OMAP_NAME
125 # undef MULTI_OMAP2
126 # define MULTI_OMAP2
127 # else
128 # define OMAP_NAME am33xx
129 # endif
130 #endif
131
132 /*
133 * Omap device type i.e. EMU/HS/TST/GP/BAD
134 */
135 #define OMAP2_DEVICE_TYPE_TEST 0
136 #define OMAP2_DEVICE_TYPE_EMU 1
137 #define OMAP2_DEVICE_TYPE_SEC 2
138 #define OMAP2_DEVICE_TYPE_GP 3
139 #define OMAP2_DEVICE_TYPE_BAD 4
140
141 int omap_type(void);
142
143 /*
144 * omap_rev bits:
145 * CPU id bits (0730, 1510, 1710, 2422...) [31:16]
146 * CPU revision (See _REV_ defined in cpu.h) [15:08]
147 * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00]
148 */
149 unsigned int omap_rev(void);
150
151 /*
152 * Get the CPU revision for OMAP devices
153 */
154 #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff)
155
156 /*
157 * Macros to group OMAP into cpu classes.
158 * These can be used in most places.
159 * cpu_is_omap7xx(): True for OMAP730, OMAP850
160 * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310
161 * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
162 * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
163 * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
164 * cpu_is_omap243x(): True for OMAP2430
165 * cpu_is_omap343x(): True for OMAP3430
166 * cpu_is_omap443x(): True for OMAP4430
167 * cpu_is_omap446x(): True for OMAP4460
168 * cpu_is_omap447x(): True for OMAP4470
169 * soc_is_omap543x(): True for OMAP5430, OMAP5432
170 */
171 #define GET_OMAP_CLASS (omap_rev() & 0xff)
172
173 #define IS_OMAP_CLASS(class, id) \
174 static inline int is_omap ##class (void) \
175 { \
176 return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
177 }
178
179 #define GET_AM_CLASS ((omap_rev() >> 24) & 0xff)
180
181 #define IS_AM_CLASS(class, id) \
182 static inline int is_am ##class (void) \
183 { \
184 return (GET_AM_CLASS == (id)) ? 1 : 0; \
185 }
186
187 #define GET_TI_CLASS ((omap_rev() >> 24) & 0xff)
188
189 #define IS_TI_CLASS(class, id) \
190 static inline int is_ti ##class (void) \
191 { \
192 return (GET_TI_CLASS == (id)) ? 1 : 0; \
193 }
194
195 #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff)
196
197 #define IS_OMAP_SUBCLASS(subclass, id) \
198 static inline int is_omap ##subclass (void) \
199 { \
200 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
201 }
202
203 #define IS_TI_SUBCLASS(subclass, id) \
204 static inline int is_ti ##subclass (void) \
205 { \
206 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
207 }
208
209 #define IS_AM_SUBCLASS(subclass, id) \
210 static inline int is_am ##subclass (void) \
211 { \
212 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
213 }
214
215 IS_OMAP_CLASS(7xx, 0x07)
216 IS_OMAP_CLASS(15xx, 0x15)
217 IS_OMAP_CLASS(16xx, 0x16)
218 IS_OMAP_CLASS(24xx, 0x24)
219 IS_OMAP_CLASS(34xx, 0x34)
220 IS_OMAP_CLASS(44xx, 0x44)
221 IS_AM_CLASS(35xx, 0x35)
222 IS_OMAP_CLASS(54xx, 0x54)
223 IS_AM_CLASS(33xx, 0x33)
224
225 IS_TI_CLASS(81xx, 0x81)
226
227 IS_OMAP_SUBCLASS(242x, 0x242)
228 IS_OMAP_SUBCLASS(243x, 0x243)
229 IS_OMAP_SUBCLASS(343x, 0x343)
230 IS_OMAP_SUBCLASS(363x, 0x363)
231 IS_OMAP_SUBCLASS(443x, 0x443)
232 IS_OMAP_SUBCLASS(446x, 0x446)
233 IS_OMAP_SUBCLASS(447x, 0x447)
234 IS_OMAP_SUBCLASS(543x, 0x543)
235
236 IS_TI_SUBCLASS(816x, 0x816)
237 IS_TI_SUBCLASS(814x, 0x814)
238 IS_AM_SUBCLASS(335x, 0x335)
239
240 #define cpu_is_omap7xx() 0
241 #define cpu_is_omap15xx() 0
242 #define cpu_is_omap16xx() 0
243 #define cpu_is_omap24xx() 0
244 #define cpu_is_omap242x() 0
245 #define cpu_is_omap243x() 0
246 #define cpu_is_omap34xx() 0
247 #define cpu_is_omap343x() 0
248 #define cpu_is_ti81xx() 0
249 #define cpu_is_ti816x() 0
250 #define cpu_is_ti814x() 0
251 #define soc_is_am35xx() 0
252 #define soc_is_am33xx() 0
253 #define soc_is_am335x() 0
254 #define cpu_is_omap44xx() 0
255 #define cpu_is_omap443x() 0
256 #define cpu_is_omap446x() 0
257 #define cpu_is_omap447x() 0
258 #define soc_is_omap54xx() 0
259 #define soc_is_omap543x() 0
260
261 #if defined(MULTI_OMAP1)
262 # if defined(CONFIG_ARCH_OMAP730)
263 # undef cpu_is_omap7xx
264 # define cpu_is_omap7xx() is_omap7xx()
265 # endif
266 # if defined(CONFIG_ARCH_OMAP850)
267 # undef cpu_is_omap7xx
268 # define cpu_is_omap7xx() is_omap7xx()
269 # endif
270 # if defined(CONFIG_ARCH_OMAP15XX)
271 # undef cpu_is_omap15xx
272 # define cpu_is_omap15xx() is_omap15xx()
273 # endif
274 # if defined(CONFIG_ARCH_OMAP16XX)
275 # undef cpu_is_omap16xx
276 # define cpu_is_omap16xx() is_omap16xx()
277 # endif
278 #else
279 # if defined(CONFIG_ARCH_OMAP730)
280 # undef cpu_is_omap7xx
281 # define cpu_is_omap7xx() 1
282 # endif
283 # if defined(CONFIG_ARCH_OMAP850)
284 # undef cpu_is_omap7xx
285 # define cpu_is_omap7xx() 1
286 # endif
287 # if defined(CONFIG_ARCH_OMAP15XX)
288 # undef cpu_is_omap15xx
289 # define cpu_is_omap15xx() 1
290 # endif
291 # if defined(CONFIG_ARCH_OMAP16XX)
292 # undef cpu_is_omap16xx
293 # define cpu_is_omap16xx() 1
294 # endif
295 #endif
296
297 #if defined(MULTI_OMAP2)
298 # if defined(CONFIG_ARCH_OMAP2)
299 # undef cpu_is_omap24xx
300 # define cpu_is_omap24xx() is_omap24xx()
301 # endif
302 # if defined (CONFIG_SOC_OMAP2420)
303 # undef cpu_is_omap242x
304 # define cpu_is_omap242x() is_omap242x()
305 # endif
306 # if defined (CONFIG_SOC_OMAP2430)
307 # undef cpu_is_omap243x
308 # define cpu_is_omap243x() is_omap243x()
309 # endif
310 # if defined(CONFIG_ARCH_OMAP3)
311 # undef cpu_is_omap34xx
312 # undef cpu_is_omap343x
313 # define cpu_is_omap34xx() is_omap34xx()
314 # define cpu_is_omap343x() is_omap343x()
315 # endif
316 #else
317 # if defined(CONFIG_ARCH_OMAP2)
318 # undef cpu_is_omap24xx
319 # define cpu_is_omap24xx() 1
320 # endif
321 # if defined(CONFIG_SOC_OMAP2420)
322 # undef cpu_is_omap242x
323 # define cpu_is_omap242x() 1
324 # endif
325 # if defined(CONFIG_SOC_OMAP2430)
326 # undef cpu_is_omap243x
327 # define cpu_is_omap243x() 1
328 # endif
329 # if defined(CONFIG_ARCH_OMAP3)
330 # undef cpu_is_omap34xx
331 # define cpu_is_omap34xx() 1
332 # endif
333 # if defined(CONFIG_SOC_OMAP3430)
334 # undef cpu_is_omap343x
335 # define cpu_is_omap343x() 1
336 # endif
337 #endif
338
339 /*
340 * Macros to detect individual cpu types.
341 * These are only rarely needed.
342 * cpu_is_omap310(): True for OMAP310
343 * cpu_is_omap1510(): True for OMAP1510
344 * cpu_is_omap1610(): True for OMAP1610
345 * cpu_is_omap1611(): True for OMAP1611
346 * cpu_is_omap5912(): True for OMAP5912
347 * cpu_is_omap1621(): True for OMAP1621
348 * cpu_is_omap1710(): True for OMAP1710
349 * cpu_is_omap2420(): True for OMAP2420
350 * cpu_is_omap2422(): True for OMAP2422
351 * cpu_is_omap2423(): True for OMAP2423
352 * cpu_is_omap2430(): True for OMAP2430
353 * cpu_is_omap3430(): True for OMAP3430
354 */
355 #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff)
356
357 #define IS_OMAP_TYPE(type, id) \
358 static inline int is_omap ##type (void) \
359 { \
360 return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
361 }
362
363 IS_OMAP_TYPE(310, 0x0310)
364 IS_OMAP_TYPE(1510, 0x1510)
365 IS_OMAP_TYPE(1610, 0x1610)
366 IS_OMAP_TYPE(1611, 0x1611)
367 IS_OMAP_TYPE(5912, 0x1611)
368 IS_OMAP_TYPE(1621, 0x1621)
369 IS_OMAP_TYPE(1710, 0x1710)
370 IS_OMAP_TYPE(2420, 0x2420)
371 IS_OMAP_TYPE(2422, 0x2422)
372 IS_OMAP_TYPE(2423, 0x2423)
373 IS_OMAP_TYPE(2430, 0x2430)
374 IS_OMAP_TYPE(3430, 0x3430)
375
376 #define cpu_is_omap310() 0
377 #define cpu_is_omap1510() 0
378 #define cpu_is_omap1610() 0
379 #define cpu_is_omap5912() 0
380 #define cpu_is_omap1611() 0
381 #define cpu_is_omap1621() 0
382 #define cpu_is_omap1710() 0
383 #define cpu_is_omap2420() 0
384 #define cpu_is_omap2422() 0
385 #define cpu_is_omap2423() 0
386 #define cpu_is_omap2430() 0
387 #define cpu_is_omap3430() 0
388 #define cpu_is_omap3630() 0
389 #define soc_is_omap5430() 0
390
391 /*
392 * Whether we have MULTI_OMAP1 or not, we still need to distinguish
393 * between 310 vs. 1510 and 1611B/5912 vs. 1710.
394 */
395
396 #if defined(CONFIG_ARCH_OMAP15XX)
397 # undef cpu_is_omap310
398 # undef cpu_is_omap1510
399 # define cpu_is_omap310() is_omap310()
400 # define cpu_is_omap1510() is_omap1510()
401 #endif
402
403 #if defined(CONFIG_ARCH_OMAP16XX)
404 # undef cpu_is_omap1610
405 # undef cpu_is_omap1611
406 # undef cpu_is_omap5912
407 # undef cpu_is_omap1621
408 # undef cpu_is_omap1710
409 # define cpu_is_omap1610() is_omap1610()
410 # define cpu_is_omap1611() is_omap1611()
411 # define cpu_is_omap5912() is_omap5912()
412 # define cpu_is_omap1621() is_omap1621()
413 # define cpu_is_omap1710() is_omap1710()
414 #endif
415
416 #if defined(CONFIG_ARCH_OMAP2)
417 # undef cpu_is_omap2420
418 # undef cpu_is_omap2422
419 # undef cpu_is_omap2423
420 # undef cpu_is_omap2430
421 # define cpu_is_omap2420() is_omap2420()
422 # define cpu_is_omap2422() is_omap2422()
423 # define cpu_is_omap2423() is_omap2423()
424 # define cpu_is_omap2430() is_omap2430()
425 #endif
426
427 #if defined(CONFIG_ARCH_OMAP3)
428 # undef cpu_is_omap3430
429 # undef cpu_is_ti81xx
430 # undef cpu_is_ti816x
431 # undef cpu_is_ti814x
432 # undef soc_is_am35xx
433 # define cpu_is_omap3430() is_omap3430()
434 # undef cpu_is_omap3630
435 # define cpu_is_omap3630() is_omap363x()
436 # define cpu_is_ti81xx() is_ti81xx()
437 # define cpu_is_ti816x() is_ti816x()
438 # define cpu_is_ti814x() is_ti814x()
439 # define soc_is_am35xx() is_am35xx()
440 #endif
441
442 # if defined(CONFIG_SOC_AM33XX)
443 # undef soc_is_am33xx
444 # undef soc_is_am335x
445 # define soc_is_am33xx() is_am33xx()
446 # define soc_is_am335x() is_am335x()
447 #endif
448
449 # if defined(CONFIG_ARCH_OMAP4)
450 # undef cpu_is_omap44xx
451 # undef cpu_is_omap443x
452 # undef cpu_is_omap446x
453 # undef cpu_is_omap447x
454 # define cpu_is_omap44xx() is_omap44xx()
455 # define cpu_is_omap443x() is_omap443x()
456 # define cpu_is_omap446x() is_omap446x()
457 # define cpu_is_omap447x() is_omap447x()
458 # endif
459
460 # if defined(CONFIG_SOC_OMAP5)
461 # undef soc_is_omap54xx
462 # undef soc_is_omap543x
463 # define soc_is_omap54xx() is_omap54xx()
464 # define soc_is_omap543x() is_omap543x()
465 #endif
466
467 /* Macros to detect if we have OMAP1 or OMAP2 */
468 #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
469 cpu_is_omap16xx())
470 #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
471 cpu_is_omap44xx() || soc_is_omap54xx() || \
472 soc_is_am33xx())
473
474 /* Various silicon revisions for omap2 */
475 #define OMAP242X_CLASS 0x24200024
476 #define OMAP2420_REV_ES1_0 OMAP242X_CLASS
477 #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8))
478
479 #define OMAP243X_CLASS 0x24300024
480 #define OMAP2430_REV_ES1_0 OMAP243X_CLASS
481
482 #define OMAP343X_CLASS 0x34300034
483 #define OMAP3430_REV_ES1_0 OMAP343X_CLASS
484 #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8))
485 #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8))
486 #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8))
487 #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8))
488 #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8))
489
490 #define OMAP363X_CLASS 0x36300034
491 #define OMAP3630_REV_ES1_0 OMAP363X_CLASS
492 #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8))
493 #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8))
494
495 #define TI816X_CLASS 0x81600034
496 #define TI8168_REV_ES1_0 TI816X_CLASS
497 #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
498
499 #define TI814X_CLASS 0x81400034
500 #define TI8148_REV_ES1_0 TI814X_CLASS
501 #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8))
502 #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8))
503
504 #define AM35XX_CLASS 0x35170034
505 #define AM35XX_REV_ES1_0 AM35XX_CLASS
506 #define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8))
507
508 #define AM335X_CLASS 0x33500033
509 #define AM335X_REV_ES1_0 AM335X_CLASS
510
511 #define OMAP443X_CLASS 0x44300044
512 #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
513 #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))
514 #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8))
515 #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8))
516 #define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8))
517
518 #define OMAP446X_CLASS 0x44600044
519 #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8))
520 #define OMAP4460_REV_ES1_1 (OMAP446X_CLASS | (0x11 << 8))
521
522 #define OMAP447X_CLASS 0x44700044
523 #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8))
524
525 #define OMAP54XX_CLASS 0x54000054
526 #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
527 #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
528
529 void omap2xxx_check_revision(void);
530 void omap3xxx_check_revision(void);
531 void omap4xxx_check_revision(void);
532 void omap5xxx_check_revision(void);
533 void omap3xxx_check_features(void);
534 void ti81xx_check_features(void);
535 void omap4xxx_check_features(void);
536
537 /*
538 * Runtime detection of OMAP3 features
539 *
540 * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip
541 * family have OS-level control over the I/O chain clock. This is
542 * to avoid a window during which wakeups could potentially be lost
543 * during powerdomain transitions. If this bit is set, it
544 * indicates that the chip does support OS-level control of this
545 * feature.
546 */
547 extern u32 omap_features;
548
549 #define OMAP3_HAS_L2CACHE BIT(0)
550 #define OMAP3_HAS_IVA BIT(1)
551 #define OMAP3_HAS_SGX BIT(2)
552 #define OMAP3_HAS_NEON BIT(3)
553 #define OMAP3_HAS_ISP BIT(4)
554 #define OMAP3_HAS_192MHZ_CLK BIT(5)
555 #define OMAP3_HAS_IO_WAKEUP BIT(6)
556 #define OMAP3_HAS_SDRC BIT(7)
557 #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8)
558 #define OMAP4_HAS_MPU_1GHZ BIT(9)
559 #define OMAP4_HAS_MPU_1_2GHZ BIT(10)
560 #define OMAP4_HAS_MPU_1_5GHZ BIT(11)
561
562
563 #define OMAP3_HAS_FEATURE(feat,flag) \
564 static inline unsigned int omap3_has_ ##feat(void) \
565 { \
566 return omap_features & OMAP3_HAS_ ##flag; \
567 } \
568
569 OMAP3_HAS_FEATURE(l2cache, L2CACHE)
570 OMAP3_HAS_FEATURE(sgx, SGX)
571 OMAP3_HAS_FEATURE(iva, IVA)
572 OMAP3_HAS_FEATURE(neon, NEON)
573 OMAP3_HAS_FEATURE(isp, ISP)
574 OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
575 OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
576 OMAP3_HAS_FEATURE(sdrc, SDRC)
577 OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL)
578
579 /*
580 * Runtime detection of OMAP4 features
581 */
582 #define OMAP4_HAS_FEATURE(feat, flag) \
583 static inline unsigned int omap4_has_ ##feat(void) \
584 { \
585 return omap_features & OMAP4_HAS_ ##flag; \
586 } \
587
588 OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ)
589 OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ)
590 OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ)
591
592 #endif /* __ASSEMBLY__ */
593 #endif
This page took 0.042212 seconds and 4 git commands to generate.