aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSanjeev Premi <premi@ti.com>2009-11-22 13:10:58 -0500
committerTony Lindgren <tony@atomide.com>2009-11-22 13:24:32 -0500
commit4cac60180649b83e094d4ea5c440229814488431 (patch)
treea5adbdcb0cd085d497727ba152407745ed06a607 /arch
parentf18af0a847f9e1a843bcb8ba69697ccbba2d03e9 (diff)
omap3: AM35xx: Runtime detection of the device
Add support to detect AM3505/AM3517 devices at runtime. Also updates the CPU names printed during boot. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/id.c36
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h12
2 files changed, 42 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 189cf7a6e61b..f8252c64c423 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -242,6 +242,14 @@ void __init omap3_check_revision(void)
242 omap_revision = OMAP3630_REV_ES1_0; 242 omap_revision = OMAP3630_REV_ES1_0;
243 } 243 }
244 break; 244 break;
245 case 0xb868:
246 /* Handle OMAP35xx/AM35xx devices
247 *
248 * Set the device to be OMAP3505 here. Actual device
249 * is identified later based on the features.
250 */
251 omap_revision = OMAP3505_REV(rev);
252 break;
245 default: 253 default:
246 /* Unknown default to latest silicon rev as default*/ 254 /* Unknown default to latest silicon rev as default*/
247 omap_revision = OMAP3630_REV_ES1_0; 255 omap_revision = OMAP3630_REV_ES1_0;
@@ -267,20 +275,36 @@ void __init omap3_cpuinfo(void)
267 * and CPU class bits. 275 * and CPU class bits.
268 */ 276 */
269 if (cpu_is_omap3630()) 277 if (cpu_is_omap3630())
270 strcpy(cpu_name, "3630"); 278 strcpy(cpu_name, "OMAP3630");
279 else if (cpu_is_omap3505()) {
280 /*
281 * AM35xx devices
282 */
283 if (omap3_has_sgx()) {
284 omap_revision = OMAP3517_REV(rev);
285 strcpy(cpu_name, "AM3517");
286 }
287 else {
288 /* Already set in omap3_check_revision() */
289 strcpy(cpu_name, "AM3505");
290 }
291 }
292 /*
293 * OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices
294 */
271 else if (omap3_has_iva() && omap3_has_sgx()) 295 else if (omap3_has_iva() && omap3_has_sgx())
272 strcpy(cpu_name, "3430/3530"); 296 strcpy(cpu_name, "OMAP3430/3530");
273 else if (omap3_has_sgx()) { 297 else if (omap3_has_sgx()) {
274 omap_revision = OMAP3525_REV(rev); 298 omap_revision = OMAP3525_REV(rev);
275 strcpy(cpu_name, "3525"); 299 strcpy(cpu_name, "OMAP3525");
276 } 300 }
277 else if (omap3_has_iva()) { 301 else if (omap3_has_iva()) {
278 omap_revision = OMAP3515_REV(rev); 302 omap_revision = OMAP3515_REV(rev);
279 strcpy(cpu_name, "3515"); 303 strcpy(cpu_name, "OMAP3515");
280 } 304 }
281 else { 305 else {
282 omap_revision = OMAP3503_REV(rev); 306 omap_revision = OMAP3503_REV(rev);
283 strcpy(cpu_name, "3503"); 307 strcpy(cpu_name, "OMAP3503");
284 } 308 }
285 309
286 switch (rev) { 310 switch (rev) {
@@ -307,7 +331,7 @@ void __init omap3_cpuinfo(void)
307 /* 331 /*
308 * Print verbose information 332 * Print verbose information
309 */ 333 */
310 pr_info("OMAP%s ES%s\n", cpu_name, cpu_rev); 334 pr_info("%s ES%s\n", cpu_name, cpu_rev);
311 335
312 OMAP3_SHOW_FEATURE(l2cache); 336 OMAP3_SHOW_FEATURE(l2cache);
313 OMAP3_SHOW_FEATURE(iva); 337 OMAP3_SHOW_FEATURE(iva);
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 7babefce62e1..2e1789001dfe 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -284,6 +284,8 @@ IS_OMAP_SUBCLASS(363x, 0x363)
284 * cpu_is_omap2423(): True for OMAP2423 284 * cpu_is_omap2423(): True for OMAP2423
285 * cpu_is_omap2430(): True for OMAP2430 285 * cpu_is_omap2430(): True for OMAP2430
286 * cpu_is_omap3430(): True for OMAP3430 286 * cpu_is_omap3430(): True for OMAP3430
287 * cpu_is_omap3505(): True for OMAP3505
288 * cpu_is_omap3517(): True for OMAP3517
287 */ 289 */
288#define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) 290#define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff)
289 291
@@ -307,6 +309,8 @@ IS_OMAP_TYPE(2422, 0x2422)
307IS_OMAP_TYPE(2423, 0x2423) 309IS_OMAP_TYPE(2423, 0x2423)
308IS_OMAP_TYPE(2430, 0x2430) 310IS_OMAP_TYPE(2430, 0x2430)
309IS_OMAP_TYPE(3430, 0x3430) 311IS_OMAP_TYPE(3430, 0x3430)
312IS_OMAP_TYPE(3505, 0x3505)
313IS_OMAP_TYPE(3517, 0x3517)
310 314
311#define cpu_is_omap310() 0 315#define cpu_is_omap310() 0
312#define cpu_is_omap730() 0 316#define cpu_is_omap730() 0
@@ -325,6 +329,8 @@ IS_OMAP_TYPE(3430, 0x3430)
325#define cpu_is_omap3515() 0 329#define cpu_is_omap3515() 0
326#define cpu_is_omap3525() 0 330#define cpu_is_omap3525() 0
327#define cpu_is_omap3530() 0 331#define cpu_is_omap3530() 0
332#define cpu_is_omap3505() 0
333#define cpu_is_omap3517() 0
328#define cpu_is_omap3430() 0 334#define cpu_is_omap3430() 0
329#define cpu_is_omap3630() 0 335#define cpu_is_omap3630() 0
330 336
@@ -380,6 +386,8 @@ IS_OMAP_TYPE(3430, 0x3430)
380# undef cpu_is_omap3515 386# undef cpu_is_omap3515
381# undef cpu_is_omap3525 387# undef cpu_is_omap3525
382# undef cpu_is_omap3530 388# undef cpu_is_omap3530
389# undef cpu_is_omap3505
390# undef cpu_is_omap3517
383# define cpu_is_omap3430() is_omap3430() 391# define cpu_is_omap3430() is_omap3430()
384# define cpu_is_omap3503() (cpu_is_omap3430() && \ 392# define cpu_is_omap3503() (cpu_is_omap3430() && \
385 (!omap3_has_iva()) && \ 393 (!omap3_has_iva()) && \
@@ -391,6 +399,8 @@ IS_OMAP_TYPE(3430, 0x3430)
391 (omap3_has_sgx()) && \ 399 (omap3_has_sgx()) && \
392 (!omap3_has_iva())) 400 (!omap3_has_iva()))
393# define cpu_is_omap3530() (cpu_is_omap3430()) 401# define cpu_is_omap3530() (cpu_is_omap3430())
402# define cpu_is_omap3505() is_omap3505()
403# define cpu_is_omap3517() is_omap3517()
394# undef cpu_is_omap3630 404# undef cpu_is_omap3630
395# define cpu_is_omap3630() is_omap363x() 405# define cpu_is_omap3630() is_omap363x()
396#endif 406#endif
@@ -430,6 +440,8 @@ IS_OMAP_TYPE(3430, 0x3430)
430#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 12)) 440#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 12))
431#define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 12)) 441#define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 12))
432#define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 12)) 442#define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 12))
443#define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 12))
444#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 12))
433 445
434#define OMAP443X_CLASS 0x44300034 446#define OMAP443X_CLASS 0x44300034
435 447