ARM: mx51: Print silicon revision on boot
Subsystems (3)
Fabio Estevam
reviewerPATCH v3 1/1 ARM: mx51: Print silicon revision on boot
Having the silicon revision to appear on the boot log is a useful information.
MX31 and MX35 already show the silicon revision on boot. Add support for displaying such information for MX51 as well.
Tested on a MX51EVK, where it shows:
CPU identified as i.MX51, silicon rev 3.0
---
Changes since v2:
- Remove unneeded return inside mx51_display_revision Changes since v1:
- Added patch description
arch/arm/mach-mx5/clock-mx51-mx53.c | 1 + arch/arm/mach-mx5/cpu.c | 20 ++++++++++++++++++++ arch/arm/plat-mxc/include/mach/mx51.h | 1 + 3 files changed, 22 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +1 -0
@@ -1510,6 +1510,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,clk_enable (&iim_clk);mx51_revision (); +mx51_display_revision ();clk_disable (&iim_clk);/* move usb_phy_clk to 24MHz */
arch/arm/mach-mx5/cpu.c +20 -0
@@ -51,6 +51,26 @@ int mx51_revision(void) }EXPORT_SYMBOL (mx51_revision); +void mx51_display_revision (void ) +{ +int rev; +char *srev; + rev =mx51_revision (); + +switch (rev) { +case IMX_CHIP_REVISION_2_0 : + srev ="2.0" ; +break ; +case IMX_CHIP_REVISION_3_0 : + srev ="3.0" ; +break ; +default : + srev ="unknown" ; + } +printk (KERN_INFO "CPU identified as i.MX51, silicon rev %s\n" , srev); +} +EXPORT_SYMBOL (mx51_display_revision); +#ifdef CONFIG_NEON /*
arch/arm/plat-mxc/include/mach/mx51.h +1 -0
@@ -347,6 +347,7 @@#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)extern int mx51_revision (void ); +extern void mx51_display_revision (void );#endif /* tape-out 1 defines */
Signature · 1 line
1.6.0.4
PATCH v3 1/1 ARM: mx51: Print silicon revision on boot
Hi Fabio,
Quoted 3 lines · Fabio Estevam
Having the silicon revision to appear on the boot log is a useful information.
MX31 and MX35 already show the silicon revision on boot. Add support for displaying such information for MX51 as well.
80 character limit?
Quoted 21 lines
Tested on a MX51EVK, where it shows:
CPU identified as i.MX51, silicon rev 3.0
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v2:
- Remove unneeded return insidemx51_display_revisionChanges since v1:
- Added patch descriptionarch/arm/mach-mx5/clock-mx51-mx53.c | 1 + arch/arm/mach-mx5/cpu.c | 20 ++++++++++++++++++++ arch/arm/plat-mxc/include/mach/mx51.h | 1 + 3 files changed, 22 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +0
-0
arch/arm/mach-mx5/clock-mx51-mx53.c int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, · line 1513
Quoted 4 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +1
-0@@ -1510,6 +1510,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,clk_enable (&iim_clk);mx51_revision (); +mx51_display_revision ();
move down one line?
Quoted 10 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +0
-0clk_disable (&iim_clk);/* move usb_phy_clk to 24MHz */ arch/arm/mach-mx5/cpu.c +0
-0@@ -51,6 +51,26 @@ int mx51_revision(void) }EXPORT_SYMBOL (mx51_revision);
arch/arm/mach-mx5/cpu.c int mx51_revision(void) · line 62
Quoted 10 lines
arch/arm/mach-mx5/cpu.c +9
-0+void mx51_display_revision (void ) +{ +int rev; +char *srev; + rev =mx51_revision (); + +switch (rev) { +case IMX_CHIP_REVISION_2_0 : + srev ="2.0" ;
Is the string common? Add a common func like imx_revision_to_str ?
Thanks
Richard
Quoted 35 lines
arch/arm/mach-mx5/cpu.c +11
-0+break ; +case IMX_CHIP_REVISION_3_0 : + srev ="3.0" ; +break ; +default : + srev ="unknown" ; + } +printk (KERN_INFO "CPU identified as i.MX51, silicon rev %s\n" , srev); +} +EXPORT_SYMBOL (mx51_display_revision); +#ifdef CONFIG_NEON /* arch/arm/plat-mxc/include/mach/mx51.h +1
-0@@ -347,6 +347,7 @@#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)extern int mx51_revision (void ); +extern void mx51_display_revision (void );#endif /* tape-out 1 defines */ Signature · 7 lines
1.6.0.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel