diff options
Diffstat (limited to 'arch/arm/mach-omap2/id.c')
-rw-r--r-- | arch/arm/mach-omap2/id.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f48a4b2654dd..a091b53657b9 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -246,6 +246,31 @@ void __init omap3_check_revision(void) | |||
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | void __init omap4_check_revision(void) | ||
250 | { | ||
251 | u32 idcode; | ||
252 | u16 hawkeye; | ||
253 | u8 rev; | ||
254 | char *rev_name = "ES1.0"; | ||
255 | |||
256 | /* | ||
257 | * The IC rev detection is done with hawkeye and rev. | ||
258 | * Note that rev does not map directly to defined processor | ||
259 | * revision numbers as ES1.0 uses value 0. | ||
260 | */ | ||
261 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | ||
262 | hawkeye = (idcode >> 12) & 0xffff; | ||
263 | rev = (idcode >> 28) & 0xff; | ||
264 | |||
265 | if ((hawkeye == 0xb852) && (rev == 0x0)) { | ||
266 | omap_revision = OMAP4430_REV_ES1_0; | ||
267 | pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); | ||
268 | return; | ||
269 | } | ||
270 | |||
271 | pr_err("Unknown OMAP4 CPU id\n"); | ||
272 | } | ||
273 | |||
249 | #define OMAP3_SHOW_FEATURE(feat) \ | 274 | #define OMAP3_SHOW_FEATURE(feat) \ |
250 | if (omap3_has_ ##feat()) \ | 275 | if (omap3_has_ ##feat()) \ |
251 | printk(#feat" "); | 276 | printk(#feat" "); |
@@ -277,10 +302,10 @@ void __init omap3_cpuinfo(void) | |||
277 | } else if (omap3_has_iva() && omap3_has_sgx()) { | 302 | } else if (omap3_has_iva() && omap3_has_sgx()) { |
278 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ | 303 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ |
279 | strcpy(cpu_name, "OMAP3430/3530"); | 304 | strcpy(cpu_name, "OMAP3430/3530"); |
280 | } else if (omap3_has_sgx()) { | 305 | } else if (omap3_has_iva()) { |
281 | omap_revision = OMAP3525_REV(rev); | 306 | omap_revision = OMAP3525_REV(rev); |
282 | strcpy(cpu_name, "OMAP3525"); | 307 | strcpy(cpu_name, "OMAP3525"); |
283 | } else if (omap3_has_iva()) { | 308 | } else if (omap3_has_sgx()) { |
284 | omap_revision = OMAP3515_REV(rev); | 309 | omap_revision = OMAP3515_REV(rev); |
285 | strcpy(cpu_name, "OMAP3515"); | 310 | strcpy(cpu_name, "OMAP3515"); |
286 | } else { | 311 | } else { |
@@ -336,7 +361,7 @@ void __init omap2_check_revision(void) | |||
336 | omap3_check_features(); | 361 | omap3_check_features(); |
337 | omap3_cpuinfo(); | 362 | omap3_cpuinfo(); |
338 | } else if (cpu_is_omap44xx()) { | 363 | } else if (cpu_is_omap44xx()) { |
339 | printk(KERN_INFO "FIXME: CPU revision = OMAP4430\n"); | 364 | omap4_check_revision(); |
340 | return; | 365 | return; |
341 | } else { | 366 | } else { |
342 | pr_err("OMAP revision unknown, please fix!\n"); | 367 | pr_err("OMAP revision unknown, please fix!\n"); |