summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/imx-common
diff options
context:
space:
mode:
authorAdrian Alonso <aalonso@freescale.com>2015-09-02 13:54:12 -0500
committerStefano Babic <sbabic@denx.de>2015-09-13 10:11:52 +0200
commit15c52b3ddd1e46743f5fb604f0cbcae144237ed5 (patch)
tree2cab6814a27387cdb219a0958f826da6f572f01f /arch/arm/include/asm/imx-common
parent922f735ecf0de23eb0e01c208f5b422f39f6aed9 (diff)
imx: arch-mx6: add is_soc_type helper macro
Add helper macro is_soc_type to identify iMX SoC family Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Diffstat (limited to 'arch/arm/include/asm/imx-common')
-rw-r--r--arch/arm/include/asm/imx-common/sys_proto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/imx-common/sys_proto.h b/arch/arm/include/asm/imx-common/sys_proto.h
index 6954ee918e..250f3f4db6 100644
--- a/arch/arm/include/asm/imx-common/sys_proto.h
+++ b/arch/arm/include/asm/imx-common/sys_proto.h
@@ -17,9 +17,12 @@
/* returns MXC_CPU_ value */
#define cpu_type(rev) (((rev) >> 12) & 0xff)
+#define soc_type(rev) (((rev) >> 12) & 0xf0)
/* both macros return/take MXC_CPU_ constants */
#define get_cpu_type() (cpu_type(get_cpu_rev()))
+#define get_soc_type() (soc_type(get_cpu_rev()))
#define is_cpu_type(cpu) (get_cpu_type() == cpu)
+#define is_soc_type(soc) (get_soc_type() == soc)
#define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))