ARM: am43xx: fix SOC revision print outs
Currently, AM43xx just re-uses the version strings from AM33xx which is wrong; the actual values for AM43xx are different. Fix this by adding a separate version string array for AM43xx and use this instead. Signed-off-by: Tero Kristo <t-kristo@ti.com> Reported-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
b28c5fcc1c
commit
a051a99f0d
|
@ -74,6 +74,10 @@ static char *cpu_revs[] = {
|
||||||
"2.0",
|
"2.0",
|
||||||
"2.1"};
|
"2.1"};
|
||||||
|
|
||||||
|
static char *cpu_revs_am43xx[] = {
|
||||||
|
"1.0",
|
||||||
|
"1.1",
|
||||||
|
"1.2"};
|
||||||
|
|
||||||
static char *dev_types[] = {
|
static char *dev_types[] = {
|
||||||
"TST",
|
"TST",
|
||||||
|
@ -87,6 +91,7 @@ static char *dev_types[] = {
|
||||||
int print_cpuinfo(void)
|
int print_cpuinfo(void)
|
||||||
{
|
{
|
||||||
char *cpu_s, *sec_s, *rev_s;
|
char *cpu_s, *sec_s, *rev_s;
|
||||||
|
char **cpu_rev_arr = cpu_revs;
|
||||||
|
|
||||||
switch (get_cpu_type()) {
|
switch (get_cpu_type()) {
|
||||||
case AM335X:
|
case AM335X:
|
||||||
|
@ -97,6 +102,7 @@ int print_cpuinfo(void)
|
||||||
break;
|
break;
|
||||||
case AM437X:
|
case AM437X:
|
||||||
cpu_s = "AM437X";
|
cpu_s = "AM437X";
|
||||||
|
cpu_rev_arr = cpu_revs_am43xx;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cpu_s = "Unknown CPU type";
|
cpu_s = "Unknown CPU type";
|
||||||
|
@ -104,7 +110,7 @@ int print_cpuinfo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
|
if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
|
||||||
rev_s = cpu_revs[get_cpu_rev()];
|
rev_s = cpu_rev_arr[get_cpu_rev()];
|
||||||
else
|
else
|
||||||
rev_s = "?";
|
rev_s = "?";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue