Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272543
b: refs/heads/master
c: 91d92d6
h: refs/heads/master
i:
  272541: 5a1cfa2
  272539: 4d79489
  272535: 426f7b9
  272527: 6952e7a
  272511: 329fbac
v: v3
  • Loading branch information
Paul Walmsley committed Sep 14, 2011
1 parent a58753d commit ab20efa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f1b0353aa3ba5dfc35641452484ea4158ee3c9c
refs/heads/master: 91d92d6cc86c9390b891a96e12a452a644c3ad76
48 changes: 22 additions & 26 deletions trunk/arch/arm/mach-omap2/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,84 +429,80 @@ static void __init omap4_check_revision(void)
static void __init omap3_cpuinfo(void)
{
u8 rev = GET_OMAP_REVISION();
char cpu_name[16], cpu_rev[16];
const char *cpu_name, *cpu_rev;

/* OMAP3430 and OMAP3530 are assumed to be same.
/*
* OMAP3430 and OMAP3530 are assumed to be same.
*
* OMAP3525, OMAP3515 and OMAP3503 can be detected only based
* on available features. Upon detection, update the CPU id
* and CPU class bits.
*/
if (cpu_is_omap3630()) {
strcpy(cpu_name, "OMAP3630");
cpu_name = "OMAP3630";
} else if (cpu_is_omap3517()) {
/*
* AM35xx devices
*/
if (omap3_has_sgx())
strcpy(cpu_name, "AM3517");
else
strcpy(cpu_name, "AM3505");
/* AM35xx devices */
cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
} else if (cpu_is_ti816x()) {
strcpy(cpu_name, "TI816X");
cpu_name = "TI816X";
} else if (omap3_has_iva() && omap3_has_sgx()) {
/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
strcpy(cpu_name, "OMAP3430/3530");
cpu_name = "OMAP3430/3530";
} else if (omap3_has_iva()) {
strcpy(cpu_name, "OMAP3525");
cpu_name = "OMAP3525";
} else if (omap3_has_sgx()) {
strcpy(cpu_name, "OMAP3515");
cpu_name = "OMAP3515";
} else {
strcpy(cpu_name, "OMAP3503");
cpu_name = "OMAP3503";
}

if (cpu_is_omap3630() || cpu_is_ti816x()) {
switch (rev) {
case OMAP_REVBITS_00:
strcpy(cpu_rev, "1.0");
cpu_rev = "1.0";
break;
case OMAP_REVBITS_01:
strcpy(cpu_rev, "1.1");
cpu_rev = "1.1";
break;
case OMAP_REVBITS_02:
/* FALLTHROUGH */
default:
/* Use the latest known revision as default */
strcpy(cpu_rev, "1.2");
cpu_rev = "1.2";
}
} else if (cpu_is_omap3505() || cpu_is_omap3517()) {
switch (rev) {
case OMAP_REVBITS_00:
strcpy(cpu_rev, "1.0");
cpu_rev = "1.0";
break;
case OMAP_REVBITS_01:
/* FALLTHROUGH */
default:
/* Use the latest known revision as default */
strcpy(cpu_rev, "1.1");
cpu_rev = "1.1";
}
} else {
switch (rev) {
case OMAP_REVBITS_00:
strcpy(cpu_rev, "1.0");
cpu_rev = "1.0";
break;
case OMAP_REVBITS_01:
strcpy(cpu_rev, "2.0");
cpu_rev = "2.0";
break;
case OMAP_REVBITS_02:
strcpy(cpu_rev, "2.1");
cpu_rev = "2.1";
break;
case OMAP_REVBITS_03:
strcpy(cpu_rev, "3.0");
cpu_rev = "3.0";
break;
case OMAP_REVBITS_04:
strcpy(cpu_rev, "3.1");
cpu_rev = "3.1";
break;
case OMAP_REVBITS_05:
/* FALLTHROUGH */
default:
/* Use the latest known revision as default */
strcpy(cpu_rev, "3.1.2");
cpu_rev = "3.1.2";
}
}

Expand Down

0 comments on commit ab20efa

Please sign in to comment.