Skip to content
Snippets Groups Projects
Commit 21254713 authored by Sergey Alyoshin's avatar Sergey Alyoshin Committed by Tom Rini
Browse files

am33xx: report silicon revision instead of code


As revision code 1 is for silicon revision 2.0, it is easily confused with
silicon revision 1.0.

Device type report also reworked in same style.

Signed-off-by: default avatarSergey Alyoshin <alyoshin.s@gmail.com>
parent d7630da6
No related branches found
No related tags found
No related merge requests found
...@@ -79,12 +79,24 @@ u32 get_sysboot_value(void) ...@@ -79,12 +79,24 @@ u32 get_sysboot_value(void)
} }
#ifdef CONFIG_DISPLAY_CPUINFO #ifdef CONFIG_DISPLAY_CPUINFO
static char *cpu_revs[] = {
"1.0",
"2.0",
"2.1"};
static char *dev_types[] = {
"TST",
"EMU",
"HS",
"GP"};
/** /**
* Print CPU information * Print CPU information
*/ */
int print_cpuinfo(void) int print_cpuinfo(void)
{ {
char *cpu_s, *sec_s; char *cpu_s, *sec_s, *rev_s;
switch (get_cpu_type()) { switch (get_cpu_type()) {
case AM335X: case AM335X:
...@@ -94,28 +106,21 @@ int print_cpuinfo(void) ...@@ -94,28 +106,21 @@ int print_cpuinfo(void)
cpu_s = "TI81XX"; cpu_s = "TI81XX";
break; break;
default: default:
cpu_s = "Unknown cpu type"; cpu_s = "Unknown CPU type";
break; break;
} }
switch (get_device_type()) { if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
case TST_DEVICE: rev_s = cpu_revs[get_cpu_rev()];
sec_s = "TST"; else
break; rev_s = "?";
case EMU_DEVICE:
sec_s = "EMU"; if (get_device_type() < ARRAY_SIZE(dev_types))
break; sec_s = dev_types[get_device_type()];
case HS_DEVICE: else
sec_s = "HS";
break;
case GP_DEVICE:
sec_s = "GP";
break;
default:
sec_s = "?"; sec_s = "?";
}
printf("%s-%s rev %d\n", cpu_s, sec_s, get_cpu_rev()); printf("%s-%s rev %s\n", cpu_s, sec_s, rev_s);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment