aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2011-08-26 01:35:18 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-26 02:50:58 -0400
commit059e58f6f3db8f563c7fef860b69c4e148f397ae (patch)
treefe9d8e50207b6a46c93a7c55d77743fd72f02dc0 /arch/arm/plat-mxc
parentfcb8ce5cfe30ca9ca5c9a79cdfe26d1993e65e0c (diff)
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. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jason Liu <jason.hui@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/cpu.c9
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d52cf5..f5b7e0fa237 100644
--- a/arch/arm/plat-mxc/cpu.c
+++ b/arch/arm/plat-mxc/cpu.c
@@ -1,5 +1,6 @@
1 1
2#include <linux/module.h> 2#include <linux/module.h>
3#include <mach/hardware.h>
3 4
4unsigned int __mxc_cpu_type; 5unsigned int __mxc_cpu_type;
5EXPORT_SYMBOL(__mxc_cpu_type); 6EXPORT_SYMBOL(__mxc_cpu_type);
@@ -9,3 +10,11 @@ void mxc_set_cpu_type(unsigned int type)
9 __mxc_cpu_type = type; 10 __mxc_cpu_type = type;
10} 11}
11 12
13void imx_print_silicon_rev(const char *cpu, int srev)
14{
15 if (srev == IMX_CHIP_REVISION_UNKNOWN)
16 pr_info("CPU identified as %s, unknown revision\n", cpu);
17 else
18 pr_info("CPU identified as %s, silicon rev %d.%d\n",
19 cpu, (srev >> 4) & 0xf, srev & 0xf);
20}
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 4e3d97890d6..318e0da13a7 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);
72extern void mx51_efikamx_reset(void); 72extern void mx51_efikamx_reset(void);
73extern int mx53_revision(void); 73extern int mx53_revision(void);
74extern int mx53_display_revision(void); 74extern int mx53_display_revision(void);
75extern void imx_print_silicon_rev(const char *cpu, int srev);
75#endif 76#endif