summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/cpu.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2011-08-26 07:35:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-26 08:50:58 +0200
commit059e58f6f3db8f563c7fef860b69c4e148f397ae (patch)
treefe9d8e50207b6a46c93a7c55d77743fd72f02dc0 /arch/arm/plat-mxc/cpu.c
parentLinux 3.1-rc3 (diff)
downloadlinux-059e58f6f3db8f563c7fef860b69c4e148f397ae.tar.xz
linux-059e58f6f3db8f563c7fef860b69c4e148f397ae.zip
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/cpu.c')
-rw-r--r--arch/arm/plat-mxc/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d52cf58..f5b7e0fa237f 100644
--- a/arch/arm/plat-mxc/cpu.c
+++ b/arch/arm/plat-mxc/cpu.c
@@ -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,11 @@ 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);
+}