Skip to contentSkip to conversation

ARM: am43xx: fix SOC revision print outs

PATCH In review Tero Kristo 4 participants 5 messages Mar 16, 2017 – Mar 21, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/arm/mach-omap2/am33xx/sys_info.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/am33xx/sys_info.c +7 -1
index f0f72fa..e4fc461 100644
@@ -74,6 +74,10 @@ static char *cpu_revs[] = {
 		"2.0",
 		"2.1"};
 
+static char *cpu_revs_am43xx[] = {
+		"1.0",
+		"1.1",
+		"1.2"};
 
 static char *dev_types[] = {
 		"TST",
@@ -87,6 +91,7 @@ static char *dev_types[] = {
 int print_cpuinfo(void)
 {
 	char *cpu_s, *sec_s, *rev_s;
+	char **cpu_rev_arr = cpu_revs;
 
 	switch (get_cpu_type()) {
 	case AM335X:
@@ -97,6 +102,7 @@ int print_cpuinfo(void)
 		break;
 	case AM437X:
 		cpu_s = "AM437X";
+		cpu_rev_arr = cpu_revs_am43xx;
 		break;
 	default:
 		cpu_s = "Unknown CPU type";
@@ -104,7 +110,7 @@ int print_cpuinfo(void)
 	}
 
 	if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
-		rev_s = cpu_revs[get_cpu_rev()];
+		rev_s = cpu_rev_arr[get_cpu_rev()];
 	else
 		rev_s = "?";
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 ARM: am43xx: fix SOC revision print outs

In reply to Tero Kristo
Quoted 43 lines · On Thu, 16 Mar 2017 09:48:54 +0200 Tero Kristo <[email protected]> wrote:

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.

---
 arch/arm/mach-omap2/am33xx/sys_info.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/am33xx/sys_info.c index f0f72fa..e4fc461 100644

arch/arm/mach-omap2/am33xx/sys_info.c +6 -0
@@ -74,6 +74,10 @@ static char *cpu_revs[] = {
 		"2.0",
 		"2.1"};
 
+static char *cpu_revs_am43xx[] = {
+		"1.0",
+		"1.1",
+		"1.2"};
 
 static char *dev_types[] = {
 		"TST",
@@ -87,6 +91,7 @@ static char *dev_types[] = {
 int print_cpuinfo(void)
 {
 	char *cpu_s, *sec_s, *rev_s;
+	char **cpu_rev_arr = cpu_revs;
 
 	switch (get_cpu_type()) {
 	case AM335X:
@@ -97,6 +102,7 @@ int print_cpuinfo(void)
 		break;
 	case AM437X:
 		cpu_s = "AM437X";
+		cpu_rev_arr = cpu_revs_am43xx;
 		break;
 	default:
 		cpu_s = "Unknown CPU type";

arch/arm/mach-omap2/am33xx/sys_info.c int print_cpuinfo(void) · line 116

Quoted 8 lines
arch/arm/mach-omap2/am33xx/sys_info.c +1 -1
@@ -104,7 +110,7 @@ int print_cpuinfo(void)
 	}
 
 	if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
-		rev_s = cpu_revs[get_cpu_rev()];
+		rev_s = cpu_rev_arr[get_cpu_rev()];
 	else
 		rev_s = "?";
 

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

#3 lore raw

PATCH 1/1 ARM: am43xx: fix SOC revision print outs

In reply to Tero Kristo
Quoted 6 lines · Tero Kristo

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/1cfc6054/attachment.sig>
#4 lore raw
In reply to Tero Kristo
Quoted 8 lines · Tero Kristo

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170321/aa9be286/attachment.sig>