OMAP4: Fix cpu detection

This patch fixes the OMAP4430 cpu detection. The IC rev detection is
done with hawkeye and rev. Note that rev does not map directly to
defined processor revision numbers as ES1.0 uses value 0.It also fixes
the SCM base address to read the correct ID_CODE register.

Also the cpu_is_omap44xx() and cpu_is_omap443x() correctly populated
instead of always being true

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Santosh Shilimkar
2009-12-11 16:16:34 -08:00
کامیت شده توسط Tony Lindgren
والد 8d88f7f70c
کامیت b570e0ec25
3فایلهای تغییر یافته به همراه33 افزوده شده و 5 حذف شده

مشاهده پرونده

@@ -246,6 +246,31 @@ void __init omap3_check_revision(void)
}
}
void __init omap4_check_revision(void)
{
u32 idcode;
u16 hawkeye;
u8 rev;
char *rev_name = "ES1.0";
/*
* The IC rev detection is done with hawkeye and rev.
* Note that rev does not map directly to defined processor
* revision numbers as ES1.0 uses value 0.
*/
idcode = read_tap_reg(OMAP_TAP_IDCODE);
hawkeye = (idcode >> 12) & 0xffff;
rev = (idcode >> 28) & 0xff;
if ((hawkeye == 0xb852) && (rev == 0x0)) {
omap_revision = OMAP4430_REV_ES1_0;
pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name);
return;
}
pr_err("Unknown OMAP4 CPU id\n");
}
#define OMAP3_SHOW_FEATURE(feat) \
if (omap3_has_ ##feat()) \
printk(#feat" ");
@@ -336,7 +361,7 @@ void __init omap2_check_revision(void)
omap3_check_features();
omap3_cpuinfo();
} else if (cpu_is_omap44xx()) {
printk(KERN_INFO "FIXME: CPU revision = OMAP4430\n");
omap4_check_revision();
return;
} else {
pr_err("OMAP revision unknown, please fix!\n");