diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/cpu.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 3fd8b4055727..8198bb6cdb5e 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2008 Nokia Corporation | 6 | * Copyright (C) 2004, 2008 Nokia Corporation |
7 | * | 7 | * |
8 | * Copyright (C) 2009 Texas Instruments. | 8 | * Copyright (C) 2009-11 Texas Instruments. |
9 | * | 9 | * |
10 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | 10 | * Written by Tony Lindgren <tony.lindgren@nokia.com> |
11 | * | 11 | * |
@@ -105,6 +105,12 @@ static inline int is_omap ##subclass (void) \ | |||
105 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | 105 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ |
106 | } | 106 | } |
107 | 107 | ||
108 | #define IS_TI_SUBCLASS(subclass, id) \ | ||
109 | static inline int is_ti ##subclass (void) \ | ||
110 | { \ | ||
111 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
112 | } | ||
113 | |||
108 | IS_OMAP_CLASS(7xx, 0x07) | 114 | IS_OMAP_CLASS(7xx, 0x07) |
109 | IS_OMAP_CLASS(15xx, 0x15) | 115 | IS_OMAP_CLASS(15xx, 0x15) |
110 | IS_OMAP_CLASS(16xx, 0x16) | 116 | IS_OMAP_CLASS(16xx, 0x16) |
@@ -118,6 +124,8 @@ IS_OMAP_SUBCLASS(343x, 0x343) | |||
118 | IS_OMAP_SUBCLASS(363x, 0x363) | 124 | IS_OMAP_SUBCLASS(363x, 0x363) |
119 | IS_OMAP_SUBCLASS(443x, 0x443) | 125 | IS_OMAP_SUBCLASS(443x, 0x443) |
120 | 126 | ||
127 | IS_TI_SUBCLASS(816x, 0x816) | ||
128 | |||
121 | #define cpu_is_omap7xx() 0 | 129 | #define cpu_is_omap7xx() 0 |
122 | #define cpu_is_omap15xx() 0 | 130 | #define cpu_is_omap15xx() 0 |
123 | #define cpu_is_omap16xx() 0 | 131 | #define cpu_is_omap16xx() 0 |
@@ -126,6 +134,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
126 | #define cpu_is_omap243x() 0 | 134 | #define cpu_is_omap243x() 0 |
127 | #define cpu_is_omap34xx() 0 | 135 | #define cpu_is_omap34xx() 0 |
128 | #define cpu_is_omap343x() 0 | 136 | #define cpu_is_omap343x() 0 |
137 | #define cpu_is_ti816x() 0 | ||
129 | #define cpu_is_omap44xx() 0 | 138 | #define cpu_is_omap44xx() 0 |
130 | #define cpu_is_omap443x() 0 | 139 | #define cpu_is_omap443x() 0 |
131 | 140 | ||
@@ -170,11 +179,11 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
170 | # undef cpu_is_omap24xx | 179 | # undef cpu_is_omap24xx |
171 | # define cpu_is_omap24xx() is_omap24xx() | 180 | # define cpu_is_omap24xx() is_omap24xx() |
172 | # endif | 181 | # endif |
173 | # if defined (CONFIG_ARCH_OMAP2420) | 182 | # if defined (CONFIG_SOC_OMAP2420) |
174 | # undef cpu_is_omap242x | 183 | # undef cpu_is_omap242x |
175 | # define cpu_is_omap242x() is_omap242x() | 184 | # define cpu_is_omap242x() is_omap242x() |
176 | # endif | 185 | # endif |
177 | # if defined (CONFIG_ARCH_OMAP2430) | 186 | # if defined (CONFIG_SOC_OMAP2430) |
178 | # undef cpu_is_omap243x | 187 | # undef cpu_is_omap243x |
179 | # define cpu_is_omap243x() is_omap243x() | 188 | # define cpu_is_omap243x() is_omap243x() |
180 | # endif | 189 | # endif |
@@ -189,11 +198,11 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
189 | # undef cpu_is_omap24xx | 198 | # undef cpu_is_omap24xx |
190 | # define cpu_is_omap24xx() 1 | 199 | # define cpu_is_omap24xx() 1 |
191 | # endif | 200 | # endif |
192 | # if defined(CONFIG_ARCH_OMAP2420) | 201 | # if defined(CONFIG_SOC_OMAP2420) |
193 | # undef cpu_is_omap242x | 202 | # undef cpu_is_omap242x |
194 | # define cpu_is_omap242x() 1 | 203 | # define cpu_is_omap242x() 1 |
195 | # endif | 204 | # endif |
196 | # if defined(CONFIG_ARCH_OMAP2430) | 205 | # if defined(CONFIG_SOC_OMAP2430) |
197 | # undef cpu_is_omap243x | 206 | # undef cpu_is_omap243x |
198 | # define cpu_is_omap243x() 1 | 207 | # define cpu_is_omap243x() 1 |
199 | # endif | 208 | # endif |
@@ -201,7 +210,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
201 | # undef cpu_is_omap34xx | 210 | # undef cpu_is_omap34xx |
202 | # define cpu_is_omap34xx() 1 | 211 | # define cpu_is_omap34xx() 1 |
203 | # endif | 212 | # endif |
204 | # if defined(CONFIG_ARCH_OMAP3430) | 213 | # if defined(CONFIG_SOC_OMAP3430) |
205 | # undef cpu_is_omap343x | 214 | # undef cpu_is_omap343x |
206 | # define cpu_is_omap343x() 1 | 215 | # define cpu_is_omap343x() 1 |
207 | # endif | 216 | # endif |
@@ -330,6 +339,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
330 | # undef cpu_is_omap3530 | 339 | # undef cpu_is_omap3530 |
331 | # undef cpu_is_omap3505 | 340 | # undef cpu_is_omap3505 |
332 | # undef cpu_is_omap3517 | 341 | # undef cpu_is_omap3517 |
342 | # undef cpu_is_ti816x | ||
333 | # define cpu_is_omap3430() is_omap3430() | 343 | # define cpu_is_omap3430() is_omap3430() |
334 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ | 344 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ |
335 | (!omap3_has_iva()) && \ | 345 | (!omap3_has_iva()) && \ |
@@ -345,6 +355,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
345 | # define cpu_is_omap3517() is_omap3517() | 355 | # define cpu_is_omap3517() is_omap3517() |
346 | # undef cpu_is_omap3630 | 356 | # undef cpu_is_omap3630 |
347 | # define cpu_is_omap3630() is_omap363x() | 357 | # define cpu_is_omap3630() is_omap363x() |
358 | # define cpu_is_ti816x() is_ti816x() | ||
348 | #endif | 359 | #endif |
349 | 360 | ||
350 | # if defined(CONFIG_ARCH_OMAP4) | 361 | # if defined(CONFIG_ARCH_OMAP4) |
@@ -389,9 +400,15 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
389 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) | 400 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) |
390 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) | 401 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) |
391 | 402 | ||
403 | #define TI816X_CLASS 0x81600034 | ||
404 | #define TI8168_REV_ES1_0 TI816X_CLASS | ||
405 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (OMAP_REVBITS_01 << 8)) | ||
406 | |||
392 | #define OMAP443X_CLASS 0x44300044 | 407 | #define OMAP443X_CLASS 0x44300044 |
393 | #define OMAP4430_REV_ES1_0 OMAP443X_CLASS | 408 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) |
394 | #define OMAP4430_REV_ES2_0 0x44301044 | 409 | #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) |
410 | #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) | ||
411 | #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) | ||
395 | 412 | ||
396 | /* | 413 | /* |
397 | * omap_chip bits | 414 | * omap_chip bits |
@@ -419,11 +436,16 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
419 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) | 436 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) |
420 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) | 437 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) |
421 | #define CHIP_IS_OMAP4430ES2 (1 << 11) | 438 | #define CHIP_IS_OMAP4430ES2 (1 << 11) |
439 | #define CHIP_IS_OMAP4430ES2_1 (1 << 12) | ||
440 | #define CHIP_IS_OMAP4430ES2_2 (1 << 13) | ||
441 | #define CHIP_IS_TI816X (1 << 14) | ||
422 | 442 | ||
423 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 443 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
424 | 444 | ||
425 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ | 445 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ |
426 | CHIP_IS_OMAP4430ES2) | 446 | CHIP_IS_OMAP4430ES2 | \ |
447 | CHIP_IS_OMAP4430ES2_1 | \ | ||
448 | CHIP_IS_OMAP4430ES2_2) | ||
427 | 449 | ||
428 | /* | 450 | /* |
429 | * "GE" here represents "greater than or equal to" in terms of ES | 451 | * "GE" here represents "greater than or equal to" in terms of ES |
@@ -455,6 +477,7 @@ extern u32 omap3_features; | |||
455 | #define OMAP3_HAS_ISP BIT(4) | 477 | #define OMAP3_HAS_ISP BIT(4) |
456 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | 478 | #define OMAP3_HAS_192MHZ_CLK BIT(5) |
457 | #define OMAP3_HAS_IO_WAKEUP BIT(6) | 479 | #define OMAP3_HAS_IO_WAKEUP BIT(6) |
480 | #define OMAP3_HAS_SDRC BIT(7) | ||
458 | 481 | ||
459 | #define OMAP3_HAS_FEATURE(feat,flag) \ | 482 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
460 | static inline unsigned int omap3_has_ ##feat(void) \ | 483 | static inline unsigned int omap3_has_ ##feat(void) \ |
@@ -469,5 +492,6 @@ OMAP3_HAS_FEATURE(neon, NEON) | |||
469 | OMAP3_HAS_FEATURE(isp, ISP) | 492 | OMAP3_HAS_FEATURE(isp, ISP) |
470 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | 493 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) |
471 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) | 494 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) |
495 | OMAP3_HAS_FEATURE(sdrc, SDRC) | ||
472 | 496 | ||
473 | #endif | 497 | #endif |