From: Eric Nelson Date: Thu, 29 Aug 2013 17:57:10 +0000 (-0700) Subject: i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu) X-Git-Tag: v2013.10-rc3~8^2~4^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ca244ded50de4b5f39ded2793a02fe5f17f9ba6;p=u-boot i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu) Signed-off-by: Eric Nelson Acked-by: Stefano Babic --- diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index bfdfd2911d..8c21364e71 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -19,6 +19,13 @@ #define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev) u32 get_cpu_rev(void); + +/* returns MXC_CPU_ value */ +#define cpu_type(rev) (((rev) >> 12)&0xff) + +/* use with MXC_CPU_ constants */ +#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu) + const char *get_imx_type(u32 imxtype); unsigned imx_ddr_size(void);