aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2011-08-28 18:25:48 +0800
committerEric Miao <eric.miao@linaro.org>2011-10-14 09:57:01 +0800
commite2a4f9a7954ddac78ff4f86468946c0c5e6f7500 (patch)
tree1c54b2fbe0a55dd7eed0665038c27c51b1a019ab
parent58b1ae2f6684ce761e5c9a64c7053aa18e2cc934 (diff)
downloadlinux-linaro-e2a4f9a7954ddac78ff4f86468946c0c5e6f7500.tar.gz
imx: add support for board revision and imx_cpu_ver()
Change copied directly from commit: c3c5711 ENGR00141217-2 include file upgrade to 2.6.38 Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 90696291f95..8b564f88efd 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -64,6 +64,22 @@
#define IMX_CHIP_REVISION_3_3_STRING "3.3"
#define IMX_CHIP_REVISION_UNKNOWN_STRING "unknown"
+#define IMX_BOARD_REV_1 0x000
+#define IMX_BOARD_REV_2 0x100
+#define IMX_BOARD_REV_3 0x200
+
+#ifndef __ASSEMBLY__
+extern unsigned int system_rev;
+#define board_is_rev(rev) (((system_rev & 0x0F00) == rev) ? 1 : 0)
+#define imx_cpu_ver() (system_rev & 0xFF)
+#endif
+
+#ifdef CONFIG_ARCH_MX5
+#define board_is_mx53_arm2() (cpu_is_mx53() && board_is_rev(IMX_BOARD_REV_2))
+#define board_is_mx53_evk_a() (cpu_is_mx53() && board_is_rev(IMX_BOARD_REV_1))
+#define board_is_mx53_evk_b() (cpu_is_mx53() && board_is_rev(IMX_BOARD_REV_3))
+#endif
+
#ifndef __ASSEMBLY__
extern unsigned int __mxc_cpu_type;
#endif