diff options
author | Sanjeev Premi <premi@ti.com> | 2009-11-22 13:10:54 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-11-22 13:24:32 -0500 |
commit | 048f4bd7607eb714d4831f90dea6fd27eac9e494 (patch) | |
tree | 058f1848655c86294181bb76a71894c0d2de1890 /arch/arm/plat-omap | |
parent | 8384ce071365244332ea05c81112bfffcf48be87 (diff) |
omap3: Runtime detection of OMAP35x devices
Add runtime check for these OMAP35x variations
based on the detected Si features:
OMAP3503, OMAP3515, OMAP3525 and OMA3530.
Also, delayed the call to pr_info() into actual
variant is detected in omap3_cpuinfo()
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 431fec45bbbc..a67439327de3 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -59,6 +59,23 @@ struct omap_chip_id { | |||
59 | unsigned int omap_rev(void); | 59 | unsigned int omap_rev(void); |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Define CPU revision bits | ||
63 | * | ||
64 | * Verbose meaning of the revision bits may be different for a silicon | ||
65 | * family. This difference can be handled separately. | ||
66 | */ | ||
67 | #define OMAP_REVBITS_00 0x00 | ||
68 | #define OMAP_REVBITS_10 0x10 | ||
69 | #define OMAP_REVBITS_20 0x20 | ||
70 | #define OMAP_REVBITS_30 0x30 | ||
71 | #define OMAP_REVBITS_40 0x40 | ||
72 | |||
73 | /* | ||
74 | * Get the CPU revision for OMAP devices | ||
75 | */ | ||
76 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
77 | |||
78 | /* | ||
62 | * Test if multicore OMAP support is needed | 79 | * Test if multicore OMAP support is needed |
63 | */ | 80 | */ |
64 | #undef MULTI_OMAP1 | 81 | #undef MULTI_OMAP1 |
@@ -303,6 +320,10 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
303 | #define cpu_is_omap2422() 0 | 320 | #define cpu_is_omap2422() 0 |
304 | #define cpu_is_omap2423() 0 | 321 | #define cpu_is_omap2423() 0 |
305 | #define cpu_is_omap2430() 0 | 322 | #define cpu_is_omap2430() 0 |
323 | #define cpu_is_omap3503() 0 | ||
324 | #define cpu_is_omap3515() 0 | ||
325 | #define cpu_is_omap3525() 0 | ||
326 | #define cpu_is_omap3530() 0 | ||
306 | #define cpu_is_omap3430() 0 | 327 | #define cpu_is_omap3430() 0 |
307 | 328 | ||
308 | /* | 329 | /* |
@@ -353,7 +374,21 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
353 | 374 | ||
354 | #if defined(CONFIG_ARCH_OMAP34XX) | 375 | #if defined(CONFIG_ARCH_OMAP34XX) |
355 | # undef cpu_is_omap3430 | 376 | # undef cpu_is_omap3430 |
377 | # undef cpu_is_omap3503 | ||
378 | # undef cpu_is_omap3515 | ||
379 | # undef cpu_is_omap3525 | ||
380 | # undef cpu_is_omap3530 | ||
356 | # define cpu_is_omap3430() is_omap3430() | 381 | # define cpu_is_omap3430() is_omap3430() |
382 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ | ||
383 | (!omap3_has_iva()) && \ | ||
384 | (!omap3_has_sgx())) | ||
385 | # define cpu_is_omap3515() (cpu_is_omap3430() && \ | ||
386 | (omap3_has_iva()) && \ | ||
387 | (!omap3_has_sgx())) | ||
388 | # define cpu_is_omap3525() (cpu_is_omap3430() && \ | ||
389 | (omap3_has_sgx()) && \ | ||
390 | (!omap3_has_iva())) | ||
391 | # define cpu_is_omap3530() (cpu_is_omap3430()) | ||
357 | #endif | 392 | #endif |
358 | 393 | ||
359 | # if defined(CONFIG_ARCH_OMAP4) | 394 | # if defined(CONFIG_ARCH_OMAP4) |
@@ -384,6 +419,12 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
384 | #define OMAP3430_REV_ES3_0 0x34303034 | 419 | #define OMAP3430_REV_ES3_0 0x34303034 |
385 | #define OMAP3430_REV_ES3_1 0x34304034 | 420 | #define OMAP3430_REV_ES3_1 0x34304034 |
386 | 421 | ||
422 | #define OMAP35XX_CLASS 0x35000034 | ||
423 | #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 12)) | ||
424 | #define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 12)) | ||
425 | #define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 12)) | ||
426 | #define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 12)) | ||
427 | |||
387 | #define OMAP443X_CLASS 0x44300034 | 428 | #define OMAP443X_CLASS 0x44300034 |
388 | 429 | ||
389 | /* | 430 | /* |