diff mbox series

[1/2] ARM: mach-imx: imx6ul: Print SOC revision on boot and set system_rev

Message ID 1606151291-288303-1-git-send-email-r.karszniewicz@phytec.de
State New
Headers show
Series [1/2] ARM: mach-imx: imx6ul: Print SOC revision on boot and set system_rev | expand

Commit Message

Robert Karszniewicz Nov. 23, 2020, 5:08 p.m. UTC
From: Stefan Riedmueller <s.riedmueller@phytec.de>

Add the print of the CPU type and SOC revision during boot and also set
the system_rev variable to the SOC revision so the correct SOC revision
will be shown in /proc/cpuinfo.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
---
 arch/arm/mach-imx/mach-imx6ul.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Robert Karszniewicz Dec. 4, 2020, 2:15 p.m. UTC | #1
Hello,

Any feedback on this series, please?

Regards,
Robert
Shawn Guo Jan. 5, 2021, 1:31 a.m. UTC | #2
On Mon, Nov 23, 2020 at 06:08:10PM +0100, Robert Karszniewicz wrote:
> From: Stefan Riedmueller <s.riedmueller@phytec.de>
> 
> Add the print of the CPU type and SOC revision during boot and also set
> the system_rev variable to the SOC revision so the correct SOC revision
> will be shown in /proc/cpuinfo.
> 
> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>

Considering we already have /sys/devices/soc0 providing these
information, I do not this change is really necessary.

Shawn

> ---
>  arch/arm/mach-imx/mach-imx6ul.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
> index e018e716735f..9c92cc72b857 100644
> --- a/arch/arm/mach-imx/mach-imx6ul.c
> +++ b/arch/arm/mach-imx/mach-imx6ul.c
> @@ -11,9 +11,11 @@
>  #include <linux/regmap.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
> +#include <asm/system_info.h>
>  
>  #include "common.h"
>  #include "cpuidle.h"
> +#include "hardware.h"
>  
>  static void __init imx6ul_enet_clk_init(void)
>  {
> @@ -55,6 +57,10 @@ static inline void imx6ul_enet_init(void)
>  
>  static void __init imx6ul_init_machine(void)
>  {
> +	system_rev = imx_get_soc_revision();
> +	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
> +		system_rev);
> +
>  	of_platform_default_populate(NULL, NULL, NULL);
>  	imx6ul_enet_init();
>  	imx_anatop_init();
> -- 
> 2.7.4
>
Robert Karszniewicz Jan. 5, 2021, 10:04 a.m. UTC | #3
On 1/5/21 2:31 AM, Shawn Guo wrote:
> On Mon, Nov 23, 2020 at 06:08:10PM +0100, Robert Karszniewicz wrote:
>> From: Stefan Riedmueller <s.riedmueller@phytec.de>
>>
>> Add the print of the CPU type and SOC revision during boot and also set
>> the system_rev variable to the SOC revision so the correct SOC revision
>> will be shown in /proc/cpuinfo.
>>
>> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
>> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
> 
> Considering we already have /sys/devices/soc0 providing these
> information, I do not this change is really necessary.

Yes, I became aware of that, that's why I sent another patch which only 
prints
the SOC revision:
[PATCH] ARM: mach-imx: imx6ul: Print SOC revision on boot
http://lists.infradead.org/pipermail/linux-arm-kernel/2020-December/624994.html

Thanks.

> 
> Shawn
> 
>> ---
>>   arch/arm/mach-imx/mach-imx6ul.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
>> index e018e716735f..9c92cc72b857 100644
>> --- a/arch/arm/mach-imx/mach-imx6ul.c
>> +++ b/arch/arm/mach-imx/mach-imx6ul.c
>> @@ -11,9 +11,11 @@
>>   #include <linux/regmap.h>
>>   #include <asm/mach/arch.h>
>>   #include <asm/mach/map.h>
>> +#include <asm/system_info.h>
>>   
>>   #include "common.h"
>>   #include "cpuidle.h"
>> +#include "hardware.h"
>>   
>>   static void __init imx6ul_enet_clk_init(void)
>>   {
>> @@ -55,6 +57,10 @@ static inline void imx6ul_enet_init(void)
>>   
>>   static void __init imx6ul_init_machine(void)
>>   {
>> +	system_rev = imx_get_soc_revision();
>> +	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
>> +		system_rev);
>> +
>>   	of_platform_default_populate(NULL, NULL, NULL);
>>   	imx6ul_enet_init();
>>   	imx_anatop_init();
>> -- 
>> 2.7.4
>>
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index e018e716735f..9c92cc72b857 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -11,9 +11,11 @@ 
 #include <linux/regmap.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/system_info.h>
 
 #include "common.h"
 #include "cpuidle.h"
+#include "hardware.h"
 
 static void __init imx6ul_enet_clk_init(void)
 {
@@ -55,6 +57,10 @@  static inline void imx6ul_enet_init(void)
 
 static void __init imx6ul_init_machine(void)
 {
+	system_rev = imx_get_soc_revision();
+	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
+		system_rev);
+
 	of_platform_default_populate(NULL, NULL, NULL);
 	imx6ul_enet_init();
 	imx_anatop_init();