/* * Get OMAP type from PROD_ID. * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM. * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense. * Undocumented register in TEST BLOCK is used as fallback; This seems to * work on 1510, 1610 & 1710. The official way hopefully will work in future * processors.
*/ static u16 __init omap_get_jtag_id(void)
{
u32 prod_id, omap_id;
/* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730/850 */ if (((prod_id >> 20) == 0) || (prod_id == omap_id))
prod_id = 0; else
prod_id &= 0xffff;
if (prod_id) return prod_id;
/* Use OMAP32_ID_1 as fallback */
prod_id = ((omap_id >> 12) & 0xffff);
return prod_id;
}
/* * Get OMAP revision from DIE_REV. * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID. * Undocumented register in the TEST BLOCK is used as fallback. * REVISIT: This does not seem to work on 1510
*/ static u8 __init omap_get_die_rev(void)
{
u32 die_rev;
die_rev = omap_readl(OMAP_DIE_ID_1);
/* Check for broken OMAP_DIE_ID on early 1710 */ if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
die_rev = 0;
/* First check only the major version in a safe way */ for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { if (jtag_id == (omap_ids[i].jtag_id)) {
omap_revision = omap_ids[i].type; break;
}
}
/* Check if we can find the die revision */ for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
omap_revision = omap_ids[i].type; break;
}
}
/* Finally check also the omap_id */ for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { if (jtag_id == omap_ids[i].jtag_id
&& die_rev == omap_ids[i].die_rev
&& omap_id == omap_ids[i].omap_id) {
omap_revision = omap_ids[i].type; break;
}
}
/* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
cpu_type = omap_revision >> 24;
switch (cpu_type) { case 0x07: case 0x08:
omap_revision |= 0x07; break; case 0x03: case 0x15:
omap_revision |= 0x15; break; case 0x16: case 0x17:
omap_revision |= 0x16; break; default:
printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.