Commit 059e58f6 authored by Fabio Estevam's avatar Fabio Estevam Committed by Sascha Hauer

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarJason Liu <jason.hui@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent fcb8ce5c
#include <linux/module.h> #include <linux/module.h>
#include <mach/hardware.h>
unsigned int __mxc_cpu_type; unsigned int __mxc_cpu_type;
EXPORT_SYMBOL(__mxc_cpu_type); EXPORT_SYMBOL(__mxc_cpu_type);
...@@ -9,3 +10,11 @@ void mxc_set_cpu_type(unsigned int type) ...@@ -9,3 +10,11 @@ void mxc_set_cpu_type(unsigned int type)
__mxc_cpu_type = 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);
}
...@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *); ...@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void); extern void mx51_efikamx_reset(void);
extern int mx53_revision(void); extern int mx53_revision(void);
extern int mx53_display_revision(void); extern int mx53_display_revision(void);
extern void imx_print_silicon_rev(const char *cpu, int srev);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment