From: jason.hui@linaro.org (Jason Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [[PATCH v2 1/6] ARM: imx: Introduce generic function for displaying silicon revision
Date: Wed, 24 Aug 2011 13:04:32 +0800 [thread overview]
Message-ID: <1314162277-2840-2-git-send-email-jason.hui@linaro.org> (raw)
In-Reply-To: <1314162277-2840-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>
Signed-off-by: Jason Liu <jason.hui@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
V2: remove EXPORT_SYMBOL
---
arch/arm/plat-mxc/cpu.c | 9 +++++++++
arch/arm/plat-mxc/include/mach/common.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d5..f5b7e0f 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);
+}
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-24 5:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 5:04 [[PATCH v2 0/6] imx soc revision clean up Jason Liu
2011-08-24 5:04 ` Jason Liu [this message]
2011-08-24 5:04 ` [[PATCH v2 2/6] ARM: mx25: Print silicon revision on boot Jason Liu
2011-08-24 5:04 ` [[PATCH v2 3/6] ARM: mx27: " Jason Liu
2011-08-24 5:04 ` [[PATCH v2 4/6] ARM: mx31: use generic function for displaying silicon revision Jason Liu
2011-08-25 10:22 ` Fabio Estevam
2011-08-26 5:44 ` Jason Hui
2011-08-24 5:04 ` [[PATCH v2 5/6] ARM: mx35: " Jason Liu
2011-08-24 5:04 ` [[PATCH v2 6/6] ARM: mx5: " Jason Liu
2011-08-25 14:51 ` Sascha Hauer
2011-08-25 15:20 ` Fabio Estevam
2011-08-24 16:33 ` [[PATCH v2 0/6] imx soc revision clean up Sascha Hauer
2011-08-26 5:38 ` Jason Hui
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=1314162277-2840-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).