From: jason.hui@linaro.org (Jason Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] ARM: imx: Introduce generic function for displaying silicon revision
Date: Tue, 23 Aug 2011 21:07:39 +0800 [thread overview]
Message-ID: <1314104864-3725-2-git-send-email-jason.hui@linaro.org> (raw)
In-Reply-To: <1314104864-3725-1-git-send-email-jason.hui@linaro.org>
From: Fabio Estevam <fabio.estevam@freescale.com>
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>
---
arch/arm/plat-mxc/cpu.c | 10 ++++++++++
arch/arm/plat-mxc/include/mach/common.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d5..f081ef0 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,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);
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 4e3d978..318e0da 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 *);
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
--
1.7.4.1
next prev parent reply other threads:[~2011-08-23 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 13:07 [PATCH 0/6] imx soc revision clean up Jason Liu
2011-08-23 13:07 ` Jason Liu [this message]
2011-08-23 13:09 ` [PATCH 1/6] ARM: imx: Introduce generic function for displaying silicon revision Sascha Hauer
2011-08-24 2:40 ` Jason Liu
2011-08-23 13:07 ` [PATCH 2/6] ARM: mx25: Print silicon revision on boot Jason Liu
2011-08-23 13:07 ` [PATCH 3/6] ARM: mx27: " Jason Liu
2011-08-23 13:07 ` [PATCH 4/6] ARM: mx31: use generic function for displaying silicon revision Jason Liu
2011-08-23 13:13 ` Sascha Hauer
2011-08-24 2:45 ` Jason Liu
2011-08-23 13:07 ` [PATCH 5/6] ARM: mx35: " Jason Liu
2011-08-23 13:07 ` [PATCH 6/6] ARM: mx5: " Jason Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314104864-3725-2-git-send-email-jason.hui@linaro.org \
--to=jason.hui@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).