All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs
@ 2017-03-16  7:48 Tero Kristo
  2017-03-16 10:34 ` Lokesh Vutla
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tero Kristo @ 2017-03-16  7:48 UTC (permalink / raw)
  To: u-boot

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>
---
 arch/arm/mach-omap2/am33xx/sys_info.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/am33xx/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
index f0f72fa..e4fc461 100644
--- a/arch/arm/mach-omap2/am33xx/sys_info.c
+++ b/arch/arm/mach-omap2/am33xx/sys_info.c
@@ -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 = "?";
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs
  2017-03-16  7:48 [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs Tero Kristo
@ 2017-03-16 10:34 ` Lokesh Vutla
  2017-03-17  8:36 ` Lukasz Majewski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Lokesh Vutla @ 2017-03-16 10:34 UTC (permalink / raw)
  To: u-boot



On Thursday 16 March 2017 01:18 PM, Tero Kristo 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.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Reported-by: Sekhar Nori <nsekhar@ti.com>

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs
  2017-03-16  7:48 [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs Tero Kristo
  2017-03-16 10:34 ` Lokesh Vutla
@ 2017-03-17  8:36 ` Lukasz Majewski
  2017-03-17 14:08 ` Tom Rini
  2017-03-21 18:09 ` [U-Boot] " Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2017-03-17  8:36 UTC (permalink / raw)
  To: u-boot

On Thu, 16 Mar 2017 09:48:54 +0200
Tero Kristo <t-kristo@ti.com> 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.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Reported-by: Sekhar Nori <nsekhar@ti.com>
> ---
>  arch/arm/mach-omap2/am33xx/sys_info.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/am33xx/sys_info.c
> b/arch/arm/mach-omap2/am33xx/sys_info.c index f0f72fa..e4fc461 100644
> --- a/arch/arm/mach-omap2/am33xx/sys_info.c
> +++ b/arch/arm/mach-omap2/am33xx/sys_info.c
> @@ -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 = "?";
>  

Reviewed-by: Lukasz Majewski <lukma@denx.de>


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs
  2017-03-16  7:48 [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs Tero Kristo
  2017-03-16 10:34 ` Lokesh Vutla
  2017-03-17  8:36 ` Lukasz Majewski
@ 2017-03-17 14:08 ` Tom Rini
  2017-03-21 18:09 ` [U-Boot] " Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2017-03-17 14:08 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 16, 2017 at 09:48:54AM +0200, Tero Kristo 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.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Reported-by: Sekhar Nori <nsekhar@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] ARM: am43xx: fix SOC revision print outs
  2017-03-16  7:48 [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs Tero Kristo
                   ` (2 preceding siblings ...)
  2017-03-17 14:08 ` Tom Rini
@ 2017-03-21 18:09 ` Tom Rini
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2017-03-21 18:09 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 16, 2017 at 09:48:54AM +0200, Tero Kristo 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.
> 
> 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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-21 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  7:48 [U-Boot] [PATCH] ARM: am43xx: fix SOC revision print outs Tero Kristo
2017-03-16 10:34 ` Lokesh Vutla
2017-03-17  8:36 ` Lukasz Majewski
2017-03-17 14:08 ` Tom Rini
2017-03-21 18:09 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.