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.h108
1 files changed, 15 insertions, 93 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 67b3d75884cd..2f9026942229 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -44,13 +44,6 @@
44 44
45int omap_type(void); 45int omap_type(void);
46 46
47struct omap_chip_id {
48 u16 oc;
49 u8 type;
50};
51
52#define OMAP_CHIP_INIT(x) { .oc = x }
53
54/* 47/*
55 * omap_rev bits: 48 * omap_rev bits:
56 * CPU id bits (0730, 1510, 1710, 2422...) [31:16] 49 * CPU id bits (0730, 1510, 1710, 2422...) [31:16]
@@ -60,19 +53,6 @@ struct omap_chip_id {
60unsigned int omap_rev(void); 53unsigned int omap_rev(void);
61 54
62/* 55/*
63 * Define CPU revision bits
64 *
65 * Verbose meaning of the revision bits may be different for a silicon
66 * family. This difference can be handled separately.
67 */
68#define OMAP_REVBITS_00 0x00
69#define OMAP_REVBITS_01 0x01
70#define OMAP_REVBITS_02 0x02
71#define OMAP_REVBITS_03 0x03
72#define OMAP_REVBITS_04 0x04
73#define OMAP_REVBITS_05 0x05
74
75/*
76 * Get the CPU revision for OMAP devices 56 * Get the CPU revision for OMAP devices
77 */ 57 */
78#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) 58#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff)
@@ -262,7 +242,7 @@ IS_OMAP_TYPE(2422, 0x2422)
262IS_OMAP_TYPE(2423, 0x2423) 242IS_OMAP_TYPE(2423, 0x2423)
263IS_OMAP_TYPE(2430, 0x2430) 243IS_OMAP_TYPE(2430, 0x2430)
264IS_OMAP_TYPE(3430, 0x3430) 244IS_OMAP_TYPE(3430, 0x3430)
265IS_OMAP_TYPE(3505, 0x3505) 245IS_OMAP_TYPE(3505, 0x3517)
266IS_OMAP_TYPE(3517, 0x3517) 246IS_OMAP_TYPE(3517, 0x3517)
267 247
268#define cpu_is_omap310() 0 248#define cpu_is_omap310() 0
@@ -354,8 +334,9 @@ IS_OMAP_TYPE(3517, 0x3517)
354 (!omap3_has_sgx()) && \ 334 (!omap3_has_sgx()) && \
355 (omap3_has_iva())) 335 (omap3_has_iva()))
356# define cpu_is_omap3530() (cpu_is_omap3430()) 336# define cpu_is_omap3530() (cpu_is_omap3430())
357# define cpu_is_omap3505() is_omap3505()
358# define cpu_is_omap3517() is_omap3517() 337# define cpu_is_omap3517() is_omap3517()
338# define cpu_is_omap3505() (cpu_is_omap3517() && \
339 !omap3_has_sgx())
359# undef cpu_is_omap3630 340# undef cpu_is_omap3630
360# define cpu_is_omap3630() is_omap363x() 341# define cpu_is_omap3630() is_omap363x()
361# define cpu_is_ti816x() is_ti816x() 342# define cpu_is_ti816x() is_ti816x()
@@ -379,35 +360,31 @@ IS_OMAP_TYPE(3517, 0x3517)
379/* Various silicon revisions for omap2 */ 360/* Various silicon revisions for omap2 */
380#define OMAP242X_CLASS 0x24200024 361#define OMAP242X_CLASS 0x24200024
381#define OMAP2420_REV_ES1_0 OMAP242X_CLASS 362#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
382#define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8)) 363#define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8))
383 364
384#define OMAP243X_CLASS 0x24300024 365#define OMAP243X_CLASS 0x24300024
385#define OMAP2430_REV_ES1_0 OMAP243X_CLASS 366#define OMAP2430_REV_ES1_0 OMAP243X_CLASS
386 367
387#define OMAP343X_CLASS 0x34300034 368#define OMAP343X_CLASS 0x34300034
388#define OMAP3430_REV_ES1_0 OMAP343X_CLASS 369#define OMAP3430_REV_ES1_0 OMAP343X_CLASS
389#define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8)) 370#define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8))
390#define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8)) 371#define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8))
391#define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8)) 372#define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8))
392#define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8)) 373#define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8))
393#define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8)) 374#define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8))
394 375
395#define OMAP363X_CLASS 0x36300034 376#define OMAP363X_CLASS 0x36300034
396#define OMAP3630_REV_ES1_0 OMAP363X_CLASS 377#define OMAP3630_REV_ES1_0 OMAP363X_CLASS
397#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8)) 378#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8))
398#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8)) 379#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8))
399 380
400#define OMAP35XX_CLASS 0x35000034 381#define OMAP3517_CLASS 0x35170034
401#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) 382#define OMAP3517_REV_ES1_0 OMAP3517_CLASS
402#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 8)) 383#define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8))
403#define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 8))
404#define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 8))
405#define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8))
406#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
407 384
408#define TI816X_CLASS 0x81600034 385#define TI816X_CLASS 0x81600034
409#define TI8168_REV_ES1_0 TI816X_CLASS 386#define TI8168_REV_ES1_0 TI816X_CLASS
410#define TI8168_REV_ES1_1 (TI816X_CLASS | (OMAP_REVBITS_01 << 8)) 387#define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
411 388
412#define OMAP443X_CLASS 0x44300044 389#define OMAP443X_CLASS 0x44300044
413#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 390#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
@@ -418,61 +395,6 @@ IS_OMAP_TYPE(3517, 0x3517)
418#define OMAP446X_CLASS 0x44600044 395#define OMAP446X_CLASS 0x44600044
419#define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) 396#define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8))
420 397
421/*
422 * omap_chip bits
423 *
424 * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is
425 * valid on all chips of that type. CHIP_IS_OMAP3430ES{1,2} indicates
426 * something that is only valid on that particular ES revision.
427 *
428 * These bits may be ORed together to indicate structures that are
429 * available on multiple chip types.
430 *
431 * To test whether a particular structure matches the current OMAP chip type,
432 * use omap_chip_is().
433 *
434 */
435#define CHIP_IS_OMAP2420 (1 << 0)
436#define CHIP_IS_OMAP2430 (1 << 1)
437#define CHIP_IS_OMAP3430 (1 << 2)
438#define CHIP_IS_OMAP3430ES1 (1 << 3)
439#define CHIP_IS_OMAP3430ES2 (1 << 4)
440#define CHIP_IS_OMAP3430ES3_0 (1 << 5)
441#define CHIP_IS_OMAP3430ES3_1 (1 << 6)
442#define CHIP_IS_OMAP3630ES1 (1 << 7)
443#define CHIP_IS_OMAP4430ES1 (1 << 8)
444#define CHIP_IS_OMAP3630ES1_1 (1 << 9)
445#define CHIP_IS_OMAP3630ES1_2 (1 << 10)
446#define CHIP_IS_OMAP4430ES2 (1 << 11)
447#define CHIP_IS_OMAP4430ES2_1 (1 << 12)
448#define CHIP_IS_OMAP4430ES2_2 (1 << 13)
449#define CHIP_IS_TI816X (1 << 14)
450#define CHIP_IS_OMAP4460ES1_0 (1 << 15)
451
452#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
453
454#define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \
455 CHIP_IS_OMAP4430ES2 | \
456 CHIP_IS_OMAP4430ES2_1 | \
457 CHIP_IS_OMAP4430ES2_2 | \
458 CHIP_IS_OMAP4460ES1_0)
459
460/*
461 * "GE" here represents "greater than or equal to" in terms of ES
462 * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430
463 * chips at ES2 and beyond, but not, for example, any OMAP lines after
464 * OMAP3.
465 */
466#define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \
467 CHIP_IS_OMAP3430ES3_0 | \
468 CHIP_GE_OMAP3430ES3_1)
469#define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \
470 CHIP_IS_OMAP3630ES1 | \
471 CHIP_GE_OMAP3630ES1_1)
472#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \
473 CHIP_IS_OMAP3630ES1_2)
474
475int omap_chip_is(struct omap_chip_id oci);
476void omap2_check_revision(void); 398void omap2_check_revision(void);
477 399
478/* 400/*