aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/include
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-12-04 23:13:30 +0800
commit4eeb77a816c50b4c5eb6e4dd46d92c7ea3e83b0f (patch)
tree2b0b420bc7d9feadf6ca90a479951414d17530d5 /arch/arm/plat-mxc/include
parent0afbd6eca5474a9ca3b9b4747931c97da522dded (diff)
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>
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 6ae27fb9331..46e872783c9 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -50,6 +50,36 @@
#define IMX_CHIP_REVISION_3_3 0x33
#define IMX_CHIP_REVISION_UNKNOWN 0xff
+#define IMX_CHIP_REVISION_1_0_STRING "1.0"
+#define IMX_CHIP_REVISION_1_1_STRING "1.1"
+#define IMX_CHIP_REVISION_1_2_STRING "1.2"
+#define IMX_CHIP_REVISION_1_3_STRING "1.3"
+#define IMX_CHIP_REVISION_2_0_STRING "2.0"
+#define IMX_CHIP_REVISION_2_1_STRING "2.1"
+#define IMX_CHIP_REVISION_2_2_STRING "2.2"
+#define IMX_CHIP_REVISION_2_3_STRING "2.3"
+#define IMX_CHIP_REVISION_3_0_STRING "3.0"
+#define IMX_CHIP_REVISION_3_1_STRING "3.1"
+#define IMX_CHIP_REVISION_3_2_STRING "3.2"
+#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