]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
i.MX6: Add convenience macros cpu_type(rev) and is_cpu_type(cpu)
authorEric Nelson <eric.nelson@boundarydevices.com>
Thu, 29 Aug 2013 17:57:10 +0000 (10:57 -0700)
committerStefano Babic <sbabic@denx.de>
Sat, 31 Aug 2013 16:03:55 +0000 (18:03 +0200)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
arch/arm/include/asm/arch-mx6/sys_proto.h

index bfdfd2911d05b10773ffcd53b93ae2de90899866..8c21364e71b7ca72cff54dd7344da533fe77cdc1 100644 (file)
 
 #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);