mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 12:34:41 +08:00
ARM: OMAP2+: SoC name and revision unification
This is a long story where for each new generation of OMAP we used different approaches for creating strings for SoCs names and revisions that this patch fixes. It makes future exporting of this information to SoC infrastructure easier. Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
4ed12be051
commit
f9d41eefcf
@ -31,8 +31,11 @@
|
||||
#define OMAP4_SILICON_TYPE_STANDARD 0x01
|
||||
#define OMAP4_SILICON_TYPE_PERFORMANCE 0x02
|
||||
|
||||
#define OMAP_SOC_MAX_NAME_LENGTH 16
|
||||
|
||||
static unsigned int omap_revision;
|
||||
static const char *cpu_rev;
|
||||
static char soc_name[OMAP_SOC_MAX_NAME_LENGTH];
|
||||
static char soc_rev[OMAP_SOC_MAX_NAME_LENGTH];
|
||||
u32 omap_features;
|
||||
|
||||
unsigned int omap_rev(void)
|
||||
@ -169,9 +172,12 @@ void __init omap2xxx_check_revision(void)
|
||||
j = i;
|
||||
}
|
||||
|
||||
pr_info("OMAP%04x", omap_rev() >> 16);
|
||||
sprintf(soc_name, "OMAP%04x", omap_rev() >> 16);
|
||||
sprintf(soc_rev, "ES%x", (omap_rev() >> 12) & 0xf);
|
||||
|
||||
pr_info("%s", soc_name);
|
||||
if ((omap_rev() >> 8) & 0x0f)
|
||||
pr_info("ES%x", (omap_rev() >> 12) & 0xf);
|
||||
pr_info("%s", soc_rev);
|
||||
pr_info("\n");
|
||||
}
|
||||
|
||||
@ -211,8 +217,10 @@ static void __init omap3_cpuinfo(void)
|
||||
cpu_name = "OMAP3503";
|
||||
}
|
||||
|
||||
sprintf(soc_name, "%s", cpu_name);
|
||||
|
||||
/* Print verbose information */
|
||||
pr_info("%s ES%s (", cpu_name, cpu_rev);
|
||||
pr_info("%s %s (", soc_name, soc_rev);
|
||||
|
||||
OMAP3_SHOW_FEATURE(l2cache);
|
||||
OMAP3_SHOW_FEATURE(iva);
|
||||
@ -291,6 +299,7 @@ void __init ti81xx_check_features(void)
|
||||
|
||||
void __init omap3xxx_check_revision(void)
|
||||
{
|
||||
const char *cpu_rev;
|
||||
u32 cpuid, idcode;
|
||||
u16 hawkeye;
|
||||
u8 rev;
|
||||
@ -438,6 +447,7 @@ void __init omap3xxx_check_revision(void)
|
||||
cpu_rev = "1.2";
|
||||
pr_warn("Warning: unknown chip type; assuming OMAP3630ES1.2\n");
|
||||
}
|
||||
sprintf(soc_rev, "ES%s", cpu_rev);
|
||||
}
|
||||
|
||||
void __init omap4xxx_check_revision(void)
|
||||
@ -512,8 +522,10 @@ void __init omap4xxx_check_revision(void)
|
||||
omap_revision = OMAP4430_REV_ES2_3;
|
||||
}
|
||||
|
||||
pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16,
|
||||
((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf));
|
||||
sprintf(soc_name, "OMAP%04x", omap_rev() >> 16);
|
||||
sprintf(soc_rev, "ES%d.%d", (omap_rev() >> 12) & 0xf,
|
||||
(omap_rev() >> 8) & 0xf);
|
||||
pr_info("%s %s\n", soc_name, soc_rev);
|
||||
}
|
||||
|
||||
void __init omap5xxx_check_revision(void)
|
||||
@ -547,8 +559,10 @@ void __init omap5xxx_check_revision(void)
|
||||
omap_revision = OMAP5430_REV_ES1_0;
|
||||
}
|
||||
|
||||
pr_info("OMAP%04x ES%d.0\n",
|
||||
omap_rev() >> 16, ((omap_rev() >> 12) & 0xf));
|
||||
sprintf(soc_name, "OMAP%04x", omap_rev() >> 16);
|
||||
sprintf(soc_rev, "ES%d.0", (omap_rev() >> 12) & 0xf);
|
||||
|
||||
pr_info("%s %s\n", soc_name, soc_rev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user