aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-09-13 21:52:13 -0400
committerPaul Walmsley <paul@pwsan.com>2011-09-13 21:52:13 -0400
commit1f1b0353aa3ba5dfc35641452484ea4158ee3c9c (patch)
treef8673543eeb41f47ef7ac4dba736bf538a726ca3 /arch
parent876355014ce3a7ba8ca299522b215365b4a3fb61 (diff)
OMAP3: id: remove identification codes that only correspond to marketing names
The OMAP3505/AM3505 appears to be based on the same silicon as the OMAP3517/AM3517, with some features disabled via eFuse bits. Follow the same practice as OMAP3430 and identify these devices internally as part of the OMAP3517/AM3517 family. The OMAP3503/3515/3525/3530 chips appear to be based on the same silicon as the OMAP3430, with some features disabled via eFuse bits. Identify these devices internally as part of the OMAP3430 family. Remove the old OMAP35XX_CLASS, which actually covered two very different chip families. The OMAP3503/3515/3525/3530 chips will now be covered by OMAP343X_CLASS, since the silicon appears to be identical. For the OMAP3517/AM3517 family, create a new class, OMAP3517_CLASS. Thanks to Tony Lindgren <tony@atomide.com> for some help with the second revision of this patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Sanjeev Premi <premi@ti.com> Cc: Tony Lindgren <tony@atomide.com> Tested-by: Igor Grinberg <grinberg@compulab.co.il> Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c11
-rw-r--r--arch/arm/mach-omap2/id.c19
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h14
3 files changed, 22 insertions, 22 deletions
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index b9b844683147..dadb8c6c0115 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3472,7 +3472,16 @@ int __init omap3xxx_clk_init(void)
3472 struct omap_clk *c; 3472 struct omap_clk *c;
3473 u32 cpu_clkflg = 0; 3473 u32 cpu_clkflg = 0;
3474 3474
3475 if (cpu_is_omap3517()) { 3475 /*
3476 * 3505 must be tested before 3517, since 3517 returns true
3477 * for both AM3517 chips and AM3517 family chips, which
3478 * includes 3505. Unfortunately there's no obvious family
3479 * test for 3517/3505 :-(
3480 */
3481 if (cpu_is_omap3505()) {
3482 cpu_mask = RATE_IN_34XX;
3483 cpu_clkflg = CK_3505;
3484 } else if (cpu_is_omap3517()) {
3476 cpu_mask = RATE_IN_34XX; 3485 cpu_mask = RATE_IN_34XX;
3477 cpu_clkflg = CK_3517; 3486 cpu_clkflg = CK_3517;
3478 } else if (cpu_is_omap3505()) { 3487 } else if (cpu_is_omap3505()) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37efb8696927..3f3f998c89e0 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -304,14 +304,15 @@ static void __init omap3_check_revision(void)
304 } 304 }
305 break; 305 break;
306 case 0xb868: 306 case 0xb868:
307 /* Handle OMAP35xx/AM35xx devices 307 /*
308 * Handle OMAP/AM 3505/3517 devices
308 * 309 *
309 * Set the device to be OMAP3505 here. Actual device 310 * Set the device to be OMAP3517 here. Actual device
310 * is identified later based on the features. 311 * is identified later based on the features.
311 * 312 *
312 * REVISIT: AM3505/AM3517 should have their own CHIP_IS 313 * REVISIT: AM3505/AM3517 should have their own CHIP_IS
313 */ 314 */
314 omap_revision = OMAP3505_REV(rev); 315 omap_revision = OMAP3517_REV(rev);
315 omap_chip.oc |= CHIP_IS_OMAP3430ES3_1; 316 omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
316 break; 317 break;
317 case 0xb891: 318 case 0xb891:
@@ -438,30 +439,24 @@ static void __init omap3_cpuinfo(void)
438 */ 439 */
439 if (cpu_is_omap3630()) { 440 if (cpu_is_omap3630()) {
440 strcpy(cpu_name, "OMAP3630"); 441 strcpy(cpu_name, "OMAP3630");
441 } else if (cpu_is_omap3505()) { 442 } else if (cpu_is_omap3517()) {
442 /* 443 /*
443 * AM35xx devices 444 * AM35xx devices
444 */ 445 */
445 if (omap3_has_sgx()) { 446 if (omap3_has_sgx())
446 omap_revision = OMAP3517_REV(rev);
447 strcpy(cpu_name, "AM3517"); 447 strcpy(cpu_name, "AM3517");
448 } else { 448 else
449 /* Already set in omap3_check_revision() */
450 strcpy(cpu_name, "AM3505"); 449 strcpy(cpu_name, "AM3505");
451 }
452 } else if (cpu_is_ti816x()) { 450 } else if (cpu_is_ti816x()) {
453 strcpy(cpu_name, "TI816X"); 451 strcpy(cpu_name, "TI816X");
454 } else if (omap3_has_iva() && omap3_has_sgx()) { 452 } else if (omap3_has_iva() && omap3_has_sgx()) {
455 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ 453 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
456 strcpy(cpu_name, "OMAP3430/3530"); 454 strcpy(cpu_name, "OMAP3430/3530");
457 } else if (omap3_has_iva()) { 455 } else if (omap3_has_iva()) {
458 omap_revision = OMAP3525_REV(rev);
459 strcpy(cpu_name, "OMAP3525"); 456 strcpy(cpu_name, "OMAP3525");
460 } else if (omap3_has_sgx()) { 457 } else if (omap3_has_sgx()) {
461 omap_revision = OMAP3515_REV(rev);
462 strcpy(cpu_name, "OMAP3515"); 458 strcpy(cpu_name, "OMAP3515");
463 } else { 459 } else {
464 omap_revision = OMAP3503_REV(rev);
465 strcpy(cpu_name, "OMAP3503"); 460 strcpy(cpu_name, "OMAP3503");
466 } 461 }
467 462
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 67b3d75884cd..34df1719462c 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -262,7 +262,7 @@ IS_OMAP_TYPE(2422, 0x2422)
262IS_OMAP_TYPE(2423, 0x2423) 262IS_OMAP_TYPE(2423, 0x2423)
263IS_OMAP_TYPE(2430, 0x2430) 263IS_OMAP_TYPE(2430, 0x2430)
264IS_OMAP_TYPE(3430, 0x3430) 264IS_OMAP_TYPE(3430, 0x3430)
265IS_OMAP_TYPE(3505, 0x3505) 265IS_OMAP_TYPE(3505, 0x3517)
266IS_OMAP_TYPE(3517, 0x3517) 266IS_OMAP_TYPE(3517, 0x3517)
267 267
268#define cpu_is_omap310() 0 268#define cpu_is_omap310() 0
@@ -354,8 +354,9 @@ IS_OMAP_TYPE(3517, 0x3517)
354 (!omap3_has_sgx()) && \ 354 (!omap3_has_sgx()) && \
355 (omap3_has_iva())) 355 (omap3_has_iva()))
356# define cpu_is_omap3530() (cpu_is_omap3430()) 356# define cpu_is_omap3530() (cpu_is_omap3430())
357# define cpu_is_omap3505() is_omap3505()
358# define cpu_is_omap3517() is_omap3517() 357# define cpu_is_omap3517() is_omap3517()
358# define cpu_is_omap3505() (cpu_is_omap3517() && \
359 !omap3_has_sgx())
359# undef cpu_is_omap3630 360# undef cpu_is_omap3630
360# define cpu_is_omap3630() is_omap363x() 361# define cpu_is_omap3630() is_omap363x()
361# define cpu_is_ti816x() is_ti816x() 362# define cpu_is_ti816x() is_ti816x()
@@ -397,13 +398,8 @@ IS_OMAP_TYPE(3517, 0x3517)
397#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8)) 398#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8))
398#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8)) 399#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8))
399 400
400#define OMAP35XX_CLASS 0x35000034 401#define OMAP3517_CLASS 0x35170034
401#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) 402#define OMAP3517_REV(v) (OMAP3517_CLASS | (v << 8))
402#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 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 403
408#define TI816X_CLASS 0x81600034 404#define TI816X_CLASS 0x81600034
409#define TI8168_REV_ES1_0 TI816X_CLASS 405#define TI8168_REV_ES1_0 TI816X_CLASS