ARM: imx: Introduce generic function for displaying silicon revision
Subsystems (3)
PATCH v2 1/2 ARM: imx: Introduce generic function for displaying silicon revision
Currently each i.MX processor has its own function for displaying the silicon revision.
Introduce a generic function for this purpose, so that all i.MX processors can reuse it.
---
Changes since v1:
- Introduce this generic function as suggested by Sascha Hauer.
Sascha,
If these 2 patches are merged, then I will convert the other i.MX processors to use this new method.
arch/arm/plat-mxc/cpu.c | 10 ++++++++++ arch/arm/plat-mxc/include/mach/common.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/cpu.c +10 -0
@@ -1,5 +1,6 @@#include <linux/module.h> +#include <mach/hardware.h> unsigned int __mxc_cpu_type;EXPORT_SYMBOL (__mxc_cpu_type);
@@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type) __mxc_cpu_type = type; } +void imx_print_silicon_rev (const char *cpu,int srev) +{ +if (srev ==IMX_CHIP_REVISION_UNKNOWN ) +pr_info ("CPU identified as %s, unknown revision\n" , cpu); +else +pr_info ("CPU identified as %s, silicon rev %d.%d\n" , + cpu, (srev >>4 ) &0xf , srev &0xf ); +} +EXPORT_SYMBOL (imx_print_silicon_rev);
arch/arm/plat-mxc/include/mach/common.h +1 -0
@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);extern void mx51_efikamx_reset (void );extern int mx53_revision (void );extern int mx53_display_revision (void ); +extern void imx_print_silicon_rev (const char *cpu,int srev);#endif
Signature · 1 line
1.7.1
PATCH v2 2/2 ARM: mx27: Print silicon revision on boot
Silicon revision is useful information to have during kernel boot.
Print the MX27 silicon revision.
---
Changes since v1:
- Use generic imx function to print silicon revision.
arch/arm/mach-imx/clock-imx27.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-imx/clock-imx27.c +1 -0
@@ -754,6 +754,7 @@ int __init mx27_clocks_init(unsigned long fref)#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC )clk_enable (&uart1_clk);#endif +imx_print_silicon_rev ("MX27" ,mx27_revision ());mxc_timer_init (&gpt1_clk,MX27_IO_ADDRESS (MX27_GPT1_BASE_ADDR ),MX27_INT_GPT1 );
Signature · 1 line
1.7.1
Sascha Hauer
maintainerPATCH v2 1/2 ARM: imx: Introduce generic function for displaying silicon revision
In reply to Fabio EstevamHi Fabio,
Quoted 5 lines · Fabio Estevam
Currently each i.MX processor has its own function for displaying the silicon revision.
Introduce a generic function for this purpose, so that all i.MX processors can reuse it.
Looks good, thanks. Do you care to update the other SoCs aswell?
Sascha
Quoted 55 lines
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:- Introduce this generic function as suggested by Sascha Hauer.
Sascha,
If these 2 patches are merged, then I will convert the other i.MX processors to use this new method.
arch/arm/plat-mxc/cpu.c | 10 ++++++++++ arch/arm/plat-mxc/include/mach/common.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)arch/arm/plat-mxc/cpu.c +10
-0@@ -1,5 +1,6 @@#include <linux/module.h> +#include <mach/hardware.h> unsigned int __mxc_cpu_type;EXPORT_SYMBOL (__mxc_cpu_type);@@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type) __mxc_cpu_type = type; } +void imx_print_silicon_rev (const char *cpu,int srev) +{ +if (srev ==IMX_CHIP_REVISION_UNKNOWN ) +pr_info ("CPU identified as %s, unknown revision\n" , cpu); +else +pr_info ("CPU identified as %s, silicon rev %d.%d\n" , + cpu, (srev >>4 ) &0xf , srev &0xf ); +} +EXPORT_SYMBOL (imx_print_silicon_rev);arch/arm/plat-mxc/include/mach/common.h +1
-0@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);extern void mx51_efikamx_reset (void );extern int mx53_revision (void );extern int mx53_display_revision (void ); +extern void imx_print_silicon_rev (const char *cpu,int srev);#endif Signature · 1 line
1.7.1
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v2 1/2 ARM: imx: Introduce generic function for displaying silicon revision
Hi, Sascha, Fabio,
2011/8/23 Sascha Hauer <[email protected]>:
Quoted 10 lines
Hi Fabio,
Quoted 5 lines · Fabio Estevam
Currently each i.MX processor has its own function for displaying the silicon revision.
Introduce a generic function for this purpose, so that all i.MX processors can reuse it.
Looks good, thanks. Do you care to update the other SoCs aswell?
I have already started to updated all other SoCs, I will send out patch soon.
Jason
Quoted 70 lines
Sascha
Quoted 49 lines
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:- Introduce this generic function as suggested by Sascha Hauer.
Sascha,
If these 2 patches are merged, then I will convert the other i.MX processors to use this new method.
?arch/arm/plat-mxc/cpu.c ? ? ? ? ? ? ? ? | ? 10 ++++++++++ ?arch/arm/plat-mxc/include/mach/common.h | ? ?1 + ?2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/cpu.c +0
-0@@ -1,5 +1,6 @@?#include <
linux/module.h>
+#include <mach/hardware.h>?unsigned int
__mxc_cpu_type;
?EXPORT_SYMBOL(__mxc_cpu_type);arch/arm/plat-mxc/cpu.c +9
-0@@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type) ? ? ? __mxc_cpu_type = type; ?} +void imx_print_silicon_rev (const char *cpu,int srev) +{ + ? ? if (srev == IMX_CHIP_REVISION_UNKNOWN) + ? ? ? ? ? ? pr_info("CPU identified as %s, unknown revision\n", cpu); + ? ? else + ? ? ? ? ? ? pr_info("CPU identified as %s, silicon rev %d.%d\n", + ? ? ? ? ? ? ? ? ? ? ? ? ? ? cpu, (srev >> 4) & 0xf, srev & 0xf); +} +EXPORT_SYMBOL (imx_print_silicon_rev);arch/arm/plat-mxc/include/mach/common.h +1
-0@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *); ?extern void mx51_efikamx_reset(void); ?extern int mx53_revision(void); ?extern int mx53_display_revision(void); +extern void imx_print_silicon_rev (const char *cpu,int srev);Quoted 6 lines
?#endif
--
1.7.1--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel