]> code.ossystems Code Review - bsp/u-boot.git/commitdiff
arm: mx6: add get_cpu_type()
authorNikita Kiryanov <nikita@compulab.co.il>
Wed, 20 Aug 2014 12:08:59 +0000 (15:08 +0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 9 Sep 2014 15:30:36 +0000 (12:30 -0300)
Define get_cpu_type(). Reuse it in is_cpu_type().

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
arch/arm/include/asm/arch-mx6/sys_proto.h

index 42d30f50212f62430357740a3eeb6b167e412a4b..ba0a66ef5ba8621b01645d5443b3e065bf60f083 100644 (file)
@@ -19,8 +19,9 @@ 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)
+/* both macros return/take MXC_CPU_ constants */
+#define get_cpu_type() (cpu_type(get_cpu_rev()))
+#define is_cpu_type(cpu) (get_cpu_type() == cpu)
 
 const char *get_imx_type(u32 imxtype);
 unsigned imx_ddr_size(void);