summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2016-05-23 18:35:52 +0800
committerStefano Babic <sbabic@denx.de>2016-05-24 14:59:55 +0200
commit32ff58bb2e1f66aa0fc9d0e9913cdca54eb819a9 (patch)
treec4476f803f19296523aa52ed954bb01a5bf4bec4 /arch/arm/include/asm
parent08ca213acadef61748dc62d48b0f5c4bed8b8c2d (diff)
downloadu-boot-imx-32ff58bb2e1f66aa0fc9d0e9913cdca54eb819a9.zip
u-boot-imx-32ff58bb2e1f66aa0fc9d0e9913cdca54eb819a9.tar.gz
u-boot-imx-32ff58bb2e1f66aa0fc9d0e9913cdca54eb819a9.tar.bz2
imx-common: introduce simpler macros for runtime dection
Introduce simpler macros for runtime cpu dection. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/imx-common/sys_proto.h8
1 files changed, 8 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 386c2dc..32f95b3 100644
--- a/arch/arm/include/asm/imx-common/sys_proto.h
+++ b/arch/arm/include/asm/imx-common/sys_proto.h
@@ -24,7 +24,15 @@
#define is_cpu_type(cpu) (get_cpu_type() == cpu)
#define is_soc_type(soc) (get_soc_type() == soc)
+#define is_mx6() (is_soc_type(MXC_SOC_MX6))
+#define is_mx7() (is_soc_type(MXC_SOC_MX7))
+
#define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
+#define is_mx6dq() (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
+#define is_mx6sdl() (is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6DL))
+#define is_mx6sx() (is_cpu_type(MXC_CPU_MX6SX))
+#define is_mx6sl() (is_cpu_type(MXC_CPU_MX6SL))
+#define is_mx6ul() (is_cpu_type(MXC_CPU_MX6UL))
u32 get_nr_cpus(void);
u32 get_cpu_rev(void);