diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-08-13 01:54:02 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-10-20 21:11:08 -0400 |
commit | bfefdff8f91aa0a9ff1291d18d54498af276a6e5 (patch) | |
tree | 39221aa63175486fbf84eced72e09ede164b2dc8 /arch/arm/mach-imx/cpu.c | |
parent | c7c3eac6277bc60fb4472a16c5af5d54afc83596 (diff) |
ARM: imx: add soc revision helper functions
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@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/cpu.c')
-rw-r--r-- | arch/arm/mach-imx/cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index e70e3acbf9bd..51f6c51ca878 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c | |||
@@ -8,11 +8,23 @@ | |||
8 | unsigned int __mxc_cpu_type; | 8 | unsigned int __mxc_cpu_type; |
9 | EXPORT_SYMBOL(__mxc_cpu_type); | 9 | EXPORT_SYMBOL(__mxc_cpu_type); |
10 | 10 | ||
11 | static unsigned int imx_soc_revision; | ||
12 | |||
11 | void mxc_set_cpu_type(unsigned int type) | 13 | void mxc_set_cpu_type(unsigned int type) |
12 | { | 14 | { |
13 | __mxc_cpu_type = type; | 15 | __mxc_cpu_type = type; |
14 | } | 16 | } |
15 | 17 | ||
18 | void imx_set_soc_revision(unsigned int rev) | ||
19 | { | ||
20 | imx_soc_revision = rev; | ||
21 | } | ||
22 | |||
23 | unsigned int imx_get_soc_revision(void) | ||
24 | { | ||
25 | return imx_soc_revision; | ||
26 | } | ||
27 | |||
16 | void imx_print_silicon_rev(const char *cpu, int srev) | 28 | void imx_print_silicon_rev(const char *cpu, int srev) |
17 | { | 29 | { |
18 | if (srev == IMX_CHIP_REVISION_UNKNOWN) | 30 | if (srev == IMX_CHIP_REVISION_UNKNOWN) |