]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00269945: ARM: imx: add soc revision helper functions
authorShawn Guo <shawn.guo@freescale.com>
Tue, 13 Aug 2013 05:54:02 +0000 (13:54 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:32 +0000 (09:54 +0800)
Similar to what we do for cpu type, the patch adds helper functions
imx_set_soc_revision() and imx_get_soc_revision() to maintain
imx_soc_revision in cpu.c.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/common.h
arch/arm/mach-imx/cpu.c

index 64666bd52bcbe563f4e9b6c25799b0f195bf7196..13a01fad84234d555a601dd179638d37dada2f0a 100644 (file)
@@ -80,6 +80,8 @@ extern int imx6q_revision(void);
 extern int mx53_display_revision(void);
 extern void imx_set_aips(void __iomem *);
 extern int mxc_device_init(void);
+extern void imx_set_soc_revision(unsigned int rev);
+extern unsigned int imx_get_soc_revision(void);
 
 enum mxc_cpu_pwr_mode {
        WAIT_CLOCKED,           /* wfi only */
index e70e3acbf9bd04516257010c86958e99da766e04..51f6c51ca8783ed6fbac57cf7ca92723c89b8109 100644 (file)
@@ -8,11 +8,23 @@
 unsigned int __mxc_cpu_type;
 EXPORT_SYMBOL(__mxc_cpu_type);
 
+static unsigned int imx_soc_revision;
+
 void mxc_set_cpu_type(unsigned int type)
 {
        __mxc_cpu_type = type;
 }
 
+void imx_set_soc_revision(unsigned int rev)
+{
+       imx_soc_revision = rev;
+}
+
+unsigned int imx_get_soc_revision(void)
+{
+       return imx_soc_revision;
+}
+
 void imx_print_silicon_rev(const char *cpu, int srev)
 {
        if (srev == IMX_CHIP_REVISION_UNKNOWN)