aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-10-29 02:19:09 +0000
committerLuka Perkov <luka@openwrt.org>2013-10-29 02:19:09 +0000
commite291d89f5c9c3d0de27c73d5f775964fc701aca6 (patch)
tree48c43554bbefd5a7697ab36dfb843b309209eea6 /target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch
parenta9f1f034386bbd54d70524718e5017b35cc55f8b (diff)
downloadmaster-187ad058-e291d89f5c9c3d0de27c73d5f775964fc701aca6.tar.gz
master-187ad058-e291d89f5c9c3d0de27c73d5f775964fc701aca6.tar.bz2
master-187ad058-e291d89f5c9c3d0de27c73d5f775964fc701aca6.zip
imx6: add initial 3.12 support
Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38574 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch')
-rw-r--r--target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch b/target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch
new file mode 100644
index 0000000000..20ea995a88
--- /dev/null
+++ b/target/linux/imx6/patches-3.12/0003-ARM-imx-add-soc-revision-helper-functions.patch
@@ -0,0 +1,52 @@
+From bfefdff8f91aa0a9ff1291d18d54498af276a6e5 Mon Sep 17 00:00:00 2001
+From: Shawn Guo <shawn.guo@linaro.org>
+Date: Tue, 13 Aug 2013 13:54:02 +0800
+Subject: [PATCH] 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>
+---
+ arch/arm/mach-imx/common.h | 2 ++
+ arch/arm/mach-imx/cpu.c | 12 ++++++++++++
+ 2 files changed, 14 insertions(+)
+
+--- a/arch/arm/mach-imx/common.h
++++ b/arch/arm/mach-imx/common.h
+@@ -81,6 +81,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);
++void imx_set_soc_revision(unsigned int rev);
++unsigned int imx_get_soc_revision(void);
+
+ enum mxc_cpu_pwr_mode {
+ WAIT_CLOCKED, /* wfi only */
+--- a/arch/arm/mach-imx/cpu.c
++++ b/arch/arm/mach-imx/cpu.c
+@@ -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)