aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include/plat/cpu.h')
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h92
1 files changed, 32 insertions, 60 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 297245dba66e..68b180edcfff 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Written by Tony Lindgren <tony.lindgren@nokia.com> 10 * Written by Tony Lindgren <tony.lindgren@nokia.com>
11 * 11 *
12 * Added OMAP4 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> 12 * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
13 * 13 *
14 * This program is free software; you can redistribute it and/or modify 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 15 * it under the terms of the GNU General Public License as published by
@@ -70,6 +70,7 @@ unsigned int omap_rev(void);
70 * cpu_is_omap443x(): True for OMAP4430 70 * cpu_is_omap443x(): True for OMAP4430
71 * cpu_is_omap446x(): True for OMAP4460 71 * cpu_is_omap446x(): True for OMAP4460
72 * cpu_is_omap447x(): True for OMAP4470 72 * cpu_is_omap447x(): True for OMAP4470
73 * soc_is_omap543x(): True for OMAP5430, OMAP5432
73 */ 74 */
74#define GET_OMAP_CLASS (omap_rev() & 0xff) 75#define GET_OMAP_CLASS (omap_rev() & 0xff)
75 76
@@ -122,6 +123,7 @@ IS_OMAP_CLASS(24xx, 0x24)
122IS_OMAP_CLASS(34xx, 0x34) 123IS_OMAP_CLASS(34xx, 0x34)
123IS_OMAP_CLASS(44xx, 0x44) 124IS_OMAP_CLASS(44xx, 0x44)
124IS_AM_CLASS(35xx, 0x35) 125IS_AM_CLASS(35xx, 0x35)
126IS_OMAP_CLASS(54xx, 0x54)
125IS_AM_CLASS(33xx, 0x33) 127IS_AM_CLASS(33xx, 0x33)
126 128
127IS_TI_CLASS(81xx, 0x81) 129IS_TI_CLASS(81xx, 0x81)
@@ -133,6 +135,7 @@ IS_OMAP_SUBCLASS(363x, 0x363)
133IS_OMAP_SUBCLASS(443x, 0x443) 135IS_OMAP_SUBCLASS(443x, 0x443)
134IS_OMAP_SUBCLASS(446x, 0x446) 136IS_OMAP_SUBCLASS(446x, 0x446)
135IS_OMAP_SUBCLASS(447x, 0x447) 137IS_OMAP_SUBCLASS(447x, 0x447)
138IS_OMAP_SUBCLASS(543x, 0x543)
136 139
137IS_TI_SUBCLASS(816x, 0x816) 140IS_TI_SUBCLASS(816x, 0x816)
138IS_TI_SUBCLASS(814x, 0x814) 141IS_TI_SUBCLASS(814x, 0x814)
@@ -150,12 +153,14 @@ IS_AM_SUBCLASS(335x, 0x335)
150#define cpu_is_ti816x() 0 153#define cpu_is_ti816x() 0
151#define cpu_is_ti814x() 0 154#define cpu_is_ti814x() 0
152#define soc_is_am35xx() 0 155#define soc_is_am35xx() 0
153#define cpu_is_am33xx() 0 156#define soc_is_am33xx() 0
154#define cpu_is_am335x() 0 157#define soc_is_am335x() 0
155#define cpu_is_omap44xx() 0 158#define cpu_is_omap44xx() 0
156#define cpu_is_omap443x() 0 159#define cpu_is_omap443x() 0
157#define cpu_is_omap446x() 0 160#define cpu_is_omap446x() 0
158#define cpu_is_omap447x() 0 161#define cpu_is_omap447x() 0
162#define soc_is_omap54xx() 0
163#define soc_is_omap543x() 0
159 164
160#if defined(MULTI_OMAP1) 165#if defined(MULTI_OMAP1)
161# if defined(CONFIG_ARCH_OMAP730) 166# if defined(CONFIG_ARCH_OMAP730)
@@ -238,9 +243,7 @@ IS_AM_SUBCLASS(335x, 0x335)
238/* 243/*
239 * Macros to detect individual cpu types. 244 * Macros to detect individual cpu types.
240 * These are only rarely needed. 245 * These are only rarely needed.
241 * cpu_is_omap330(): True for OMAP330 246 * cpu_is_omap310(): True for OMAP310
242 * cpu_is_omap730(): True for OMAP730
243 * cpu_is_omap850(): True for OMAP850
244 * cpu_is_omap1510(): True for OMAP1510 247 * cpu_is_omap1510(): True for OMAP1510
245 * cpu_is_omap1610(): True for OMAP1610 248 * cpu_is_omap1610(): True for OMAP1610
246 * cpu_is_omap1611(): True for OMAP1611 249 * cpu_is_omap1611(): True for OMAP1611
@@ -252,8 +255,6 @@ IS_AM_SUBCLASS(335x, 0x335)
252 * cpu_is_omap2423(): True for OMAP2423 255 * cpu_is_omap2423(): True for OMAP2423
253 * cpu_is_omap2430(): True for OMAP2430 256 * cpu_is_omap2430(): True for OMAP2430
254 * cpu_is_omap3430(): True for OMAP3430 257 * cpu_is_omap3430(): True for OMAP3430
255 * cpu_is_omap3505(): True for OMAP3505
256 * cpu_is_omap3517(): True for OMAP3517
257 */ 258 */
258#define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) 259#define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff)
259 260
@@ -264,8 +265,6 @@ static inline int is_omap ##type (void) \
264} 265}
265 266
266IS_OMAP_TYPE(310, 0x0310) 267IS_OMAP_TYPE(310, 0x0310)
267IS_OMAP_TYPE(730, 0x0730)
268IS_OMAP_TYPE(850, 0x0850)
269IS_OMAP_TYPE(1510, 0x1510) 268IS_OMAP_TYPE(1510, 0x1510)
270IS_OMAP_TYPE(1610, 0x1610) 269IS_OMAP_TYPE(1610, 0x1610)
271IS_OMAP_TYPE(1611, 0x1611) 270IS_OMAP_TYPE(1611, 0x1611)
@@ -277,12 +276,8 @@ IS_OMAP_TYPE(2422, 0x2422)
277IS_OMAP_TYPE(2423, 0x2423) 276IS_OMAP_TYPE(2423, 0x2423)
278IS_OMAP_TYPE(2430, 0x2430) 277IS_OMAP_TYPE(2430, 0x2430)
279IS_OMAP_TYPE(3430, 0x3430) 278IS_OMAP_TYPE(3430, 0x3430)
280IS_OMAP_TYPE(3505, 0x3517)
281IS_OMAP_TYPE(3517, 0x3517)
282 279
283#define cpu_is_omap310() 0 280#define cpu_is_omap310() 0
284#define cpu_is_omap730() 0
285#define cpu_is_omap850() 0
286#define cpu_is_omap1510() 0 281#define cpu_is_omap1510() 0
287#define cpu_is_omap1610() 0 282#define cpu_is_omap1610() 0
288#define cpu_is_omap5912() 0 283#define cpu_is_omap5912() 0
@@ -293,30 +288,15 @@ IS_OMAP_TYPE(3517, 0x3517)
293#define cpu_is_omap2422() 0 288#define cpu_is_omap2422() 0
294#define cpu_is_omap2423() 0 289#define cpu_is_omap2423() 0
295#define cpu_is_omap2430() 0 290#define cpu_is_omap2430() 0
296#define cpu_is_omap3503() 0
297#define cpu_is_omap3515() 0
298#define cpu_is_omap3525() 0
299#define cpu_is_omap3530() 0
300#define cpu_is_omap3505() 0
301#define cpu_is_omap3517() 0
302#define cpu_is_omap3430() 0 291#define cpu_is_omap3430() 0
303#define cpu_is_omap3630() 0 292#define cpu_is_omap3630() 0
293#define soc_is_omap5430() 0
304 294
305/* 295/*
306 * Whether we have MULTI_OMAP1 or not, we still need to distinguish 296 * Whether we have MULTI_OMAP1 or not, we still need to distinguish
307 * between 730 vs 850, 330 vs. 1510 and 1611B/5912 vs. 1710. 297 * between 310 vs. 1510 and 1611B/5912 vs. 1710.
308 */ 298 */
309 299
310#if defined(CONFIG_ARCH_OMAP730)
311# undef cpu_is_omap730
312# define cpu_is_omap730() is_omap730()
313#endif
314
315#if defined(CONFIG_ARCH_OMAP850)
316# undef cpu_is_omap850
317# define cpu_is_omap850() is_omap850()
318#endif
319
320#if defined(CONFIG_ARCH_OMAP15XX) 300#if defined(CONFIG_ARCH_OMAP15XX)
321# undef cpu_is_omap310 301# undef cpu_is_omap310
322# undef cpu_is_omap1510 302# undef cpu_is_omap1510
@@ -350,40 +330,24 @@ IS_OMAP_TYPE(3517, 0x3517)
350 330
351#if defined(CONFIG_ARCH_OMAP3) 331#if defined(CONFIG_ARCH_OMAP3)
352# undef cpu_is_omap3430 332# undef cpu_is_omap3430
353# undef cpu_is_omap3503
354# undef cpu_is_omap3515
355# undef cpu_is_omap3525
356# undef cpu_is_omap3530
357# undef cpu_is_omap3505
358# undef cpu_is_omap3517
359# undef cpu_is_ti81xx 333# undef cpu_is_ti81xx
360# undef cpu_is_ti816x 334# undef cpu_is_ti816x
361# undef cpu_is_ti814x 335# undef cpu_is_ti814x
362# undef soc_is_am35xx 336# undef soc_is_am35xx
363# undef cpu_is_am33xx
364# undef cpu_is_am335x
365# define cpu_is_omap3430() is_omap3430() 337# define cpu_is_omap3430() is_omap3430()
366# define cpu_is_omap3503() (cpu_is_omap3430() && \
367 (!omap3_has_iva()) && \
368 (!omap3_has_sgx()))
369# define cpu_is_omap3515() (cpu_is_omap3430() && \
370 (!omap3_has_iva()) && \
371 (omap3_has_sgx()))
372# define cpu_is_omap3525() (cpu_is_omap3430() && \
373 (!omap3_has_sgx()) && \
374 (omap3_has_iva()))
375# define cpu_is_omap3530() (cpu_is_omap3430())
376# define cpu_is_omap3517() is_omap3517()
377# define cpu_is_omap3505() (cpu_is_omap3517() && \
378 !omap3_has_sgx())
379# undef cpu_is_omap3630 338# undef cpu_is_omap3630
380# define cpu_is_omap3630() is_omap363x() 339# define cpu_is_omap3630() is_omap363x()
381# define cpu_is_ti81xx() is_ti81xx() 340# define cpu_is_ti81xx() is_ti81xx()
382# define cpu_is_ti816x() is_ti816x() 341# define cpu_is_ti816x() is_ti816x()
383# define cpu_is_ti814x() is_ti814x() 342# define cpu_is_ti814x() is_ti814x()
384# define soc_is_am35xx() is_am35xx() 343# define soc_is_am35xx() is_am35xx()
385# define cpu_is_am33xx() is_am33xx() 344#endif
386# define cpu_is_am335x() is_am335x() 345
346# if defined(CONFIG_SOC_AM33XX)
347# undef soc_is_am33xx
348# undef soc_is_am335x
349# define soc_is_am33xx() is_am33xx()
350# define soc_is_am335x() is_am335x()
387#endif 351#endif
388 352
389# if defined(CONFIG_ARCH_OMAP4) 353# if defined(CONFIG_ARCH_OMAP4)
@@ -397,11 +361,18 @@ IS_OMAP_TYPE(3517, 0x3517)
397# define cpu_is_omap447x() is_omap447x() 361# define cpu_is_omap447x() is_omap447x()
398# endif 362# endif
399 363
364# if defined(CONFIG_SOC_OMAP5)
365# undef soc_is_omap54xx
366# undef soc_is_omap543x
367# define soc_is_omap54xx() is_omap54xx()
368# define soc_is_omap543x() is_omap543x()
369#endif
370
400/* Macros to detect if we have OMAP1 or OMAP2 */ 371/* Macros to detect if we have OMAP1 or OMAP2 */
401#define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ 372#define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
402 cpu_is_omap16xx()) 373 cpu_is_omap16xx())
403#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ 374#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
404 cpu_is_omap44xx()) 375 cpu_is_omap44xx() || soc_is_omap54xx())
405 376
406/* Various silicon revisions for omap2 */ 377/* Various silicon revisions for omap2 */
407#define OMAP242X_CLASS 0x24200024 378#define OMAP242X_CLASS 0x24200024
@@ -424,10 +395,6 @@ IS_OMAP_TYPE(3517, 0x3517)
424#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) 395#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8))
425#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) 396#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8))
426 397
427#define OMAP3517_CLASS 0x35170034
428#define OMAP3517_REV_ES1_0 OMAP3517_CLASS
429#define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8))
430
431#define TI816X_CLASS 0x81600034 398#define TI816X_CLASS 0x81600034
432#define TI8168_REV_ES1_0 TI816X_CLASS 399#define TI8168_REV_ES1_0 TI816X_CLASS
433#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) 400#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
@@ -441,7 +408,7 @@ IS_OMAP_TYPE(3517, 0x3517)
441#define AM35XX_REV_ES1_0 AM35XX_CLASS 408#define AM35XX_REV_ES1_0 AM35XX_CLASS
442#define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) 409#define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8))
443 410
444#define AM335X_CLASS 0x33500034 411#define AM335X_CLASS 0x33500033
445#define AM335X_REV_ES1_0 AM335X_CLASS 412#define AM335X_REV_ES1_0 AM335X_CLASS
446 413
447#define OMAP443X_CLASS 0x44300044 414#define OMAP443X_CLASS 0x44300044
@@ -458,9 +425,14 @@ IS_OMAP_TYPE(3517, 0x3517)
458#define OMAP447X_CLASS 0x44700044 425#define OMAP447X_CLASS 0x44700044
459#define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8)) 426#define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8))
460 427
428#define OMAP54XX_CLASS 0x54000054
429#define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
430#define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
431
461void omap2xxx_check_revision(void); 432void omap2xxx_check_revision(void);
462void omap3xxx_check_revision(void); 433void omap3xxx_check_revision(void);
463void omap4xxx_check_revision(void); 434void omap4xxx_check_revision(void);
435void omap5xxx_check_revision(void);
464void omap3xxx_check_features(void); 436void omap3xxx_check_features(void);
465void ti81xx_check_features(void); 437void ti81xx_check_features(void);
466void omap4xxx_check_features(void); 438void omap4xxx_check_features(void);